How to add a link in the Redmine menu only for logged in users?

Asked

Viewed 114 times

2

I created a link, at the top of Redmine, for a certain sector of the company. I need to know how to hide this link if there is no logged in user.

The button was created in the init.Rb file of my plugin containing the following sinatxe...

menu :top_menu, :my_link, { :controller => 'my_controller', :action => 'index' },
     :last => true,  :caption => :my_caption

I’ve tried to use User.current.logged? but I was unsuccessful.

1 answer

3


  • Is now functional!

  • Cool, solved? If yes, mark the answer as right :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.