summaryrefslogtreecommitdiff
path: root/app/policies/namespace_policy.rb
blob: 85b67f0a237ed01b96890f87bf70bd028591fbde (plain)
1
2
3
4
5
6
7
8
9
10
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