debian-mirror-gitlab/app/policies/namespace_policy.rb

11 lines
219 B
Ruby
Raw Normal View History

2016-09-29 09:46:39 +05:30
class NamespacePolicy < BasePolicy
2017-09-10 17:25:29 +05:30
rule { anonymous }.prevent_all
2016-09-29 09:46:39 +05:30
2017-09-10 17:25:29 +05:30
condition(:owner) { @subject.owner == @user }
rule { owner | admin }.policy do
enable :create_projects
enable :admin_namespace
2016-09-29 09:46:39 +05:30
end
end