Cross Reference: permission_helper.rb
xref
: /
ontohub
/
app
/
helpers
/
permission_helper.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
permission_helper.rb revision ee5342a8882c2fc7631fcffb5497e6597747887c
module
PermissionHelper
def
can_create
?
(
parent
,
cls_sym
)
cls
=
cls_sym.to_s.classify.constantize
if
parent
can
?
(:
create
,
cls
)
&&
can
?
(:
write
,
parent.repository
)
else
can
? :
create
,
cls
end
end
end