mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
spaces policy
This commit is contained in:
parent
05d4b7b3c5
commit
c254cad8e5
13
app/policies/space_policy.rb
Normal file
13
app/policies/space_policy.rb
Normal file
@ -0,0 +1,13 @@
|
||||
class SpacePolicy < ApplicationPolicy
|
||||
def create?
|
||||
user.is_admin?
|
||||
end
|
||||
|
||||
def update?
|
||||
user.is_admin?
|
||||
end
|
||||
|
||||
def destroy?
|
||||
user.is_admin? and record.destroyable?
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user