debian-mirror-gitlab/app/policies/namespace_policy.rb

11 lines
193 B
Ruby
Raw Normal View History

2016-09-29 09:46:39 +05:30
class NamespacePolicy < BasePolicy
def rules
return unless @user
if @subject.owner == @user || @user.admin?
can! :create_projects
can! :admin_namespace
end
end
end