summaryrefslogtreecommitdiff
path: root/app/policies/namespace_policy.rb
blob: 29bb357e00a8c63b53267d160d91974ebb62bb1b (plain)
1
2
3
4
5
6
7
8
9
10
class NamespacePolicy < BasePolicy
  def rules
    return unless @user

    if @subject.owner == @user || @user.admin?
      can! :create_projects
      can! :admin_namespace
    end
  end
end