This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 472
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #950 from monstermunchkin/issues/606
add internal policy for namespaces
- Loading branch information
Showing
34 changed files
with
404 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
var ns = $('#namespace_<%= namespace.id %> td a.btn'); | ||
|
||
<% if namespace.global? %> | ||
<% if namespace.visibility_public? %> | ||
$(ns[0]).addClass("btn-default") | ||
$(ns[0]).removeClass("btn-primary") | ||
$(ns[1]).addClass("btn-primary") | ||
$(ns[1]).removeClass("btn-default") | ||
<% elsif namespace.visibility_protected? %> | ||
$(ns[0]).addClass("btn-primary") | ||
$(ns[0]).removeClass("btn-default") | ||
$(ns[1]).addClass("btn-default") | ||
$(ns[1]).removeClass("btn-primary") | ||
<% end %> | ||
<% else %> | ||
<% if namespace.visibility_public? %> | ||
$(ns[0]).addClass("btn-default") | ||
$(ns[0]).removeClass("btn-primary") | ||
$(ns[1]).addClass("btn-default") | ||
$(ns[1]).removeClass("btn-primary") | ||
$(ns[2]).addClass("btn-primary") | ||
$(ns[2]).removeClass("btn-default") | ||
<% elsif namespace.visibility_protected? %> | ||
$(ns[0]).addClass("btn-default") | ||
$(ns[0]).removeClass("btn-primary") | ||
$(ns[1]).addClass("btn-primary") | ||
$(ns[1]).removeClass("btn-default") | ||
$(ns[2]).addClass("btn-default") | ||
$(ns[2]).removeClass("btn-primary") | ||
<% else %> | ||
// private | ||
$(ns[0]).addClass("btn-primary") | ||
$(ns[0]).removeClass("btn-default") | ||
$(ns[1]).addClass("btn-default") | ||
$(ns[1]).removeClass("btn-primary") | ||
$(ns[2]).addClass("btn-default") | ||
$(ns[2]).removeClass("btn-primary") | ||
<% end %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
app/views/public_activity/namespace/_change_visibility.csv.slim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
= CSV.generate_line(['namespace', activity.trackable.name, 'change visibility', '-', activity.owner.display_username, activity.created_at, "is #{activity.parameters[:visibility].sub('visibility_', '')}"]) |
15 changes: 15 additions & 0 deletions
15
app/views/public_activity/namespace/_change_visibility.html.slim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
li | ||
.activitie-container | ||
.activity-type.change-namespace-visibility | ||
i.fa.fa-unlock | ||
.user-image | ||
= user_image_tag(activity.owner.email) | ||
.description | ||
h6 | ||
strong | ||
= "#{activity.owner.display_username} set the " | ||
= link_to activity.trackable.name, activity.trackable | ||
= " namespace as #{activity.parameters[:visibility].sub('visibility_', '')}" | ||
small | ||
i.fa.fa-clock-o | ||
= activity_time_tag activity.created_at |
Oops, something went wrong.