Project

General

Profile

Help with determining current user role

Added by Keith Savoie over 10 years ago

I am fiddling/hacking with my first plugin. I want to hide the members pane based on users role.

I copied 'views/projects/_members_box.html.erb' into my modules dir.
I want to add somethign simple around the code like this (hard coded role for now)

<% if ?userRole? != "Public" >
... template code here ...
<
end %>

But I cant figure out how to get the logged in users role in viewed project within this .erb file.
Everything I try crashs the app.

Any help appreciated! Thanks.


Replies (2)

RE: Help with determining current user role - Added by Krunal Jariwala 7 months ago

Any help here about how to do this? I am looking for something similar.

RE: Help with determining current user role - Added by C S 7 months ago

I can only think of one plugin that can do something like this:
https://www.redmine.org/plugins/redmine_cms

    (1-2/2)