diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2017-11-23 15:47:15 +0100 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2017-11-23 17:44:05 +0100 |
commit | 97f966c445c0c2191a8017aa981a34737b9adf56 (patch) | |
tree | 297294c7ae4b22267da7c88aac70a13263346542 /app/policies | |
parent | dfbfd3c7d7d4677ac99a7f8147a673911e8d4e98 (diff) | |
download | gitlab-ce-97f966c445c0c2191a8017aa981a34737b9adf56.tar.gz |
Introduce :read_namespace access policy for namespace and group
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/group_policy.rb | 2 | ||||
-rw-r--r-- | app/policies/namespace_policy.rb | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/app/policies/group_policy.rb b/app/policies/group_policy.rb index 8af9738d75c..a2518bc1080 100644 --- a/app/policies/group_policy.rb +++ b/app/policies/group_policy.rb @@ -34,6 +34,8 @@ class GroupPolicy < BasePolicy rule { admin } .enable :read_group rule { has_projects } .enable :read_group + rule { has_access }.enable :read_namespace + rule { developer }.enable :admin_milestones rule { reporter }.enable :admin_label diff --git a/app/policies/namespace_policy.rb b/app/policies/namespace_policy.rb index 92213f0155e..eb01218eb0a 100644 --- a/app/policies/namespace_policy.rb +++ b/app/policies/namespace_policy.rb @@ -8,6 +8,7 @@ class NamespacePolicy < BasePolicy rule { owner | admin }.policy do enable :create_projects enable :admin_namespace + enable :read_namespace end rule { personal_project & ~can_create_personal_project }.prevent :create_projects |