gitlab-org--gitlab-foss/app/policies/namespace_policy.rb
2017-06-27 12:44:37 -07:00

10 lines
219 B
Ruby

class NamespacePolicy < BasePolicy
rule { anonymous }.prevent_all
condition(:owner) { @subject.owner == @user }
rule { owner | admin }.policy do
enable :create_projects
enable :admin_namespace
end
end