ruby on rails - How to override redmine.rb permissions in plugin init.rb -


I am developing a random plugin that has been used to provide some additional permission / denial options, among them A featured administrator can sometimes allow / reject the report for the role.

The problem is that if you try to redefine the permissions defined in redmine.rb in your plugins, init.rb permissions are merged, this leads to the fact that one Other permissions (included in : view_issues ) which allows issuing reports.

How can I get the Override permission My plugins in Redmine.rb are defined in init.rb

My plugins init.rb: < RedMine :: Plugin.register: report_roles Name 'Report Rollers Plugin' Name Writer 'Author's Name' Description 'This is a plugin for redmini' version '0.0.1' url 'http: //example.com/path/to/plugin 'author_url' http://example.com/about 'RedMine :: AccessControl.map | Map | Map.project_module: issue_tracking do | Map | Map.permission: generate_issue_reports, {: reports => [: Issue_report, issue_report_directory]},: Read = & gt; True end-end end

and related parts of my redmine.rb:

...

  map.project_module: issue_tracking map | # Map of issue categories. Missions: manage_categories, {: projects => : Settings ,: issue_grade = & gt; [: Index, show: new,: create, edit :: update, delete]},: requirement => : Member # issues map.permission: view_issues, {: issues = & gt; [: Index, show],: auto_complete = & gt; [: Issues] ,: context_menus = & gt; [: Issues] ,: Version = & gt; [: Index, show:, by position_],: magazines => [: Index ,: diff] ,: queries = & gt; : Index, report = & gt; [: Issue_report ;: issue_report_details]} ,: Read = & gt; True End  

...

: Report = & gt; [: Issue_report, Issue_report_details] (Includes: View_eues) also allows the release of the report, I just want to "remove" the permission from : issue_views and give them additional permission Will give up, because the : view_issues permission should be enabled!

I tried to redefine the : view_issues in my init.rb, but it did not have any effect.


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -