gitlab-org--gitlab-foss/app/policies/namespace_policy.rb

11 lines
219 B
Ruby
Raw Normal View History

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