How to acces to a priviledge from a view.
Added by Antoine Rodriguez almost 13 years ago
Hi,
I have in my init.rb this :
project_module :plugin_name do
permission :disable_this, :issue => :index
end
In my view I have this :<% if User.current.allowed_to?(:disable_this, @issue) %>
Followed by the end syntax after the bloc of code that I want to filter.
My trouble is that the permission work like as if it was global and not role based.
When I access with a role with disable_this enabled then my bloc of code isn't showed. But it acts the same with a role that has disable_this disabled until I disable it from the first role.
How can I change my if condition in order to check the permission at role level ?
Best regards,
Replies (1)
RE: How to acces to a priviledge from a view.
-
Added by Antoine Rodriguez almost 13 years ago
Hi,
I'm quite a begginer in both redmine and ruby on rails .... The answer may seem obvious but please :
If someone knows how to check if one role has the permission and another not : please answer me !
Thank you very much for the help.
Best regards.