Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2017-09-06 21:31:45 +0300
committerMichael Kozono <mkozono@gmail.com>2017-09-06 22:07:21 +0300
commit1feeea9c6af5d683f18c021df16e4eedfa9306e0 (patch)
tree4869cd4d3b9e839a4eba612c9da5205b73dafbe6 /app
parenta887194abd2ea0c0cbcd24f0ff7630800d3eec12 (diff)
Refer to “Share with group lock” consistently
Diffstat (limited to 'app')
-rw-r--r--app/helpers/groups_helper.rb8
-rw-r--r--app/policies/group_policy.rb6
-rw-r--r--app/services/groups/update_service.rb2
-rw-r--r--app/views/groups/edit.html.haml2
4 files changed, 9 insertions, 9 deletions
diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb
index 58daf5c97e6..36b79da1bde 100644
--- a/app/helpers/groups_helper.rb
+++ b/app/helpers/groups_helper.rb
@@ -108,9 +108,9 @@ module GroupsHelper
end
end
- def remove_the_share_lock_from_ancestor(group)
+ def remove_the_share_with_group_lock_from_ancestor(group)
ancestor = oldest_consecutively_locked_ancestor(group)
- text = s_("GroupSettings|remove the share lock from %{ancestor_group_name}") % { ancestor_group_name: ancestor.name }
+ text = s_("GroupSettings|remove the share with group lock from %{ancestor_group_name}") % { ancestor_group_name: ancestor.name }
if can?(current_user, :admin_group, ancestor)
link_to text, edit_group_path(ancestor)
else
@@ -129,11 +129,11 @@ module GroupsHelper
end
def ancestor_locked_but_you_can_override(group)
- s_("GroupSettings|This setting is applied on %{ancestor_group}. You can override the setting or %{remove_ancestor_share_lock}.").html_safe % { ancestor_group: ancestor_group(group), remove_ancestor_share_lock: remove_the_share_lock_from_ancestor(group) }
+ s_("GroupSettings|This setting is applied on %{ancestor_group}. You can override the setting or %{remove_ancestor_share_with_group_lock}.").html_safe % { ancestor_group: ancestor_group(group), remove_ancestor_share_with_group_lock: remove_the_share_with_group_lock_from_ancestor(group) }
end
def ancestor_locked_so_ask_the_owner(group)
- s_("GroupSettings|This setting is applied on %{ancestor_group}. To share projects in this group with another group, ask the owner to override the setting or %{remove_ancestor_share_lock}.").html_safe % { ancestor_group: ancestor_group(group), remove_ancestor_share_lock: remove_the_share_lock_from_ancestor(group) }
+ s_("GroupSettings|This setting is applied on %{ancestor_group}. To share projects in this group with another group, ask the owner to override the setting or %{remove_ancestor_share_with_group_lock}.").html_safe % { ancestor_group: ancestor_group(group), remove_ancestor_share_with_group_lock: remove_the_share_with_group_lock_from_ancestor(group) }
end
def ancestor_locked_and_has_been_overridden(group)
diff --git a/app/policies/group_policy.rb b/app/policies/group_policy.rb
index 70622ba553c..db889892da0 100644
--- a/app/policies/group_policy.rb
+++ b/app/policies/group_policy.rb
@@ -15,8 +15,8 @@ class GroupPolicy < BasePolicy
condition(:nested_groups_supported, scope: :global) { Group.supports_nested_groups? }
- condition(:share_locked, scope: :subject) { @subject.share_with_group_lock? }
- condition(:parent_share_locked, scope: :subject) { @subject.parent&.share_with_group_lock? }
+ condition(:share_with_group_locked, scope: :subject) { @subject.share_with_group_lock? }
+ condition(:parent_share_with_group_locked, scope: :subject) { @subject.parent&.share_with_group_lock? }
condition(:can_change_parent_share_with_group_lock) { @subject.has_parent? && can?(:change_share_with_group_lock, @subject.parent) }
condition(:has_projects) do
@@ -58,7 +58,7 @@ class GroupPolicy < BasePolicy
rule { ~can?(:view_globally) }.prevent :request_access
rule { has_access }.prevent :request_access
- rule { owner & (~share_locked | ~parent_share_locked | can_change_parent_share_with_group_lock) }.enable :change_share_with_group_lock
+ rule { owner & (~share_with_group_locked | ~parent_share_with_group_locked | can_change_parent_share_with_group_lock) }.enable :change_share_with_group_lock
def access_level
return GroupMember::NO_ACCESS if @user.nil?
diff --git a/app/services/groups/update_service.rb b/app/services/groups/update_service.rb
index 246aff6c0fa..08e3efb96e3 100644
--- a/app/services/groups/update_service.rb
+++ b/app/services/groups/update_service.rb
@@ -30,7 +30,7 @@ module Groups
return true unless changing_share_with_group_lock?
return true if can?(current_user, :change_share_with_group_lock, group)
- group.errors.add(:share_with_group_lock, s_('GroupSettings|cannot be disabled when the parent group Share with group lock is enabled, except by the owner of the parent group'))
+ group.errors.add(:share_with_group_lock, s_('GroupSettings|cannot be disabled when the parent group "Share with group lock" is enabled, except by the owner of the parent group'))
false
end
diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml
index 45450a1ca98..0d3308833b7 100644
--- a/app/views/groups/edit.html.haml
+++ b/app/views/groups/edit.html.haml
@@ -30,7 +30,7 @@
.form-group
%label.control-label
- = s_("GroupSettings|Share lock")
+ = s_("GroupSettings|Share with group lock")
.col-sm-10
.checkbox
= f.label :share_with_group_lock do