How to add new permissions in top_menu
Added by marco balatresi over 13 years ago
Hello everyone,
I'm developing a plugin for test. I would like to know how to set my code for add new permissions. My code (not working) is as follows:
File inti.rb:
Redmine::Plugin.register :redmine_myload do name 'Plugin' author 'Who' description 'plugin' version '0.0.1' permission :my_menu, {:myload => [:index, :mytable, :logged, :insert, :error_set, :show]} permission :my_user, {:myload => [:present, :my, :call]} menu :top_menu, :myload, { :controller => 'myload', :action => 'index' }, :caption => 'Myload' end
On mycontroller:
before_filter :authorize, :only => :index
when i set the permissions (like admin user ) and when the user try to use myload, redmine tells the error "do not have permission"
Someone can help me?
Thank you