Project

General

Profile

Give access to my plugin to a certain group in redmine

Added by Maxime Roussin over 8 years ago

Ruby : 2.1.5p273
Rails : 4.2.1
RedMine : 3.0.3

I have a custom group with members in them and I would like that group to have access to the plugin.

In my init.rb :

      menu :application_menu, :release_approbation, {:controller => 'release_approbation', :action => 'index'}, :if => Proc.new { User.current.allowed_to?(:release_view, nil, :global => true) }, :caption => 'Release Approbation'
      permission :release_view, :release_approbation => :index, :require => :loggedin
      permission :release_approve, :release_approbation => :approve, :require => :loggedin

In my controller :


      before_filter :authorize_global, :release_approbation => :index
      before_filter :authorize_global, :release_approbation => :approve

In my redmine admin panel in roles and permission, the group I added have the permission to the plugin actions. This is not part of any project, but a global plugin.