0
我有一個自定義組,其中包含成員,我希望該組有權訪問該插件。授予我的插件到redmine中的某個組
在我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
在我的控制器:
before_filter :authorize_global, :release_approbation => :index
before_filter :authorize_global, :release_approbation => :approve
在角色和權限我的管理平臺管理面板,我添加的組具有的權限,以插件的行爲。這不是任何項目的一部分,而是全球插件。