How to check if the user has a specific pivilage
Replies (1)
(1-1/1)
Added by Jai prakash about 9 years ago
Trying to write a plug-in for which I need to check if the user has a particular permission . For example I am thinking of something like this
if (user.current has "view_private_notes" )
do something
end
How can i do this
if User.current.allowed_to?(:view_private_notes, @project)
do something
end
(1-1/1)