debian-mirror-gitlab/app/policies/namespace_policy.rb
2017-09-10 17:25:29 +05:30

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