summaryrefslogtreecommitdiff
path: root/app/policies
diff options
context:
space:
mode:
Diffstat (limited to 'app/policies')
-rw-r--r--app/policies/clusters/cluster_policy.rb2
-rw-r--r--app/policies/deploy_token_policy.rb4
-rw-r--r--app/policies/group_policy.rb4
-rw-r--r--app/policies/project_policy.rb8
4 files changed, 9 insertions, 9 deletions
diff --git a/app/policies/clusters/cluster_policy.rb b/app/policies/clusters/cluster_policy.rb
index 1f7c13072b9..b5b24491655 100644
--- a/app/policies/clusters/cluster_policy.rb
+++ b/app/policies/clusters/cluster_policy.rb
@@ -4,7 +4,7 @@ module Clusters
delegate { cluster.project }
- rule { can?(:master_access) }.policy do
+ rule { can?(:maintainer_access) }.policy do
enable :update_cluster
enable :admin_cluster
end
diff --git a/app/policies/deploy_token_policy.rb b/app/policies/deploy_token_policy.rb
index 7aa9106e8b1..d1b459cfc90 100644
--- a/app/policies/deploy_token_policy.rb
+++ b/app/policies/deploy_token_policy.rb
@@ -1,10 +1,10 @@
class DeployTokenPolicy < BasePolicy
with_options scope: :subject, score: 0
- condition(:master) { @subject.project.team.master?(@user) }
+ condition(:maintainer) { @subject.project.team.maintainer?(@user) }
rule { anonymous }.prevent_all
- rule { master }.policy do
+ rule { maintainer }.policy do
enable :create_deploy_token
enable :update_deploy_token
end
diff --git a/app/policies/group_policy.rb b/app/policies/group_policy.rb
index ded9fe30eff..dc339b71ec7 100644
--- a/app/policies/group_policy.rb
+++ b/app/policies/group_policy.rb
@@ -11,7 +11,7 @@ class GroupPolicy < BasePolicy
condition(:guest) { access_level >= GroupMember::GUEST }
condition(:developer) { access_level >= GroupMember::DEVELOPER }
condition(:owner) { access_level >= GroupMember::OWNER }
- condition(:master) { access_level >= GroupMember::MASTER }
+ condition(:maintainer) { access_level >= GroupMember::MAINTAINER }
condition(:reporter) { access_level >= GroupMember::REPORTER }
condition(:nested_groups_supported, scope: :global) { Group.supports_nested_groups? }
@@ -59,7 +59,7 @@ class GroupPolicy < BasePolicy
enable :admin_issue
end
- rule { master }.policy do
+ rule { maintainer }.policy do
enable :create_projects
enable :admin_pipeline
enable :admin_build
diff --git a/app/policies/project_policy.rb b/app/policies/project_policy.rb
index 199bcf92b21..bc49092633f 100644
--- a/app/policies/project_policy.rb
+++ b/app/policies/project_policy.rb
@@ -46,7 +46,7 @@ class ProjectPolicy < BasePolicy
condition(:developer) { team_access_level >= Gitlab::Access::DEVELOPER }
desc "User has maintainer access"
- condition(:master) { team_access_level >= Gitlab::Access::MASTER }
+ condition(:maintainer) { team_access_level >= Gitlab::Access::MAINTAINER }
desc "Project is public"
condition(:public_project, scope: :subject, score: 0) { project.public? }
@@ -123,14 +123,14 @@ class ProjectPolicy < BasePolicy
rule { guest }.enable :guest_access
rule { reporter }.enable :reporter_access
rule { developer }.enable :developer_access
- rule { master }.enable :master_access
+ rule { maintainer }.enable :maintainer_access
rule { owner | admin }.enable :owner_access
rule { can?(:owner_access) }.policy do
enable :guest_access
enable :reporter_access
enable :developer_access
- enable :master_access
+ enable :maintainer_access
enable :change_namespace
enable :change_visibility_level
@@ -228,7 +228,7 @@ class ProjectPolicy < BasePolicy
enable :create_deployment
end
- rule { can?(:master_access) }.policy do
+ rule { can?(:maintainer_access) }.policy do
enable :push_to_delete_protected_branch
enable :update_project_snippet
enable :update_environment