mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-28 13:31:06 +00:00
13 lines
214 B
Ruby
13 lines
214 B
Ruby
|
class Lock < ActiveRecord::Base
|
||
|
include Extra
|
||
|
belongs_to :lockable, :polymorphic => true
|
||
|
|
||
|
def can_create? cuser
|
||
|
cuser and cuser.admin?
|
||
|
end
|
||
|
|
||
|
def can_destroy? cuser
|
||
|
cuser and cuser.admin?
|
||
|
end
|
||
|
end
|