gitlab-org--gitlab-foss/app/policies/namespace_policy.rb
2016-08-30 11:39:22 -07:00

10 lines
193 B
Ruby

class NamespacePolicy < BasePolicy
def rules
return unless @user
if @subject.owner == @user || @user.admin?
can! :create_projects
can! :admin_namespace
end
end
end