2016-08-18 12:52:35 -04:00
|
|
|
class NamespacePolicy < BasePolicy
|
2017-04-06 17:06:42 -04:00
|
|
|
rule { anonymous }.prevent_all
|
2016-08-18 12:52:35 -04:00
|
|
|
|
2017-04-06 17:06:42 -04:00
|
|
|
condition(:owner) { @subject.owner == @user }
|
|
|
|
|
|
|
|
rule { owner | admin }.policy do
|
|
|
|
enable :create_projects
|
|
|
|
enable :admin_namespace
|
2016-08-18 12:52:35 -04:00
|
|
|
end
|
|
|
|
end
|