Vote #66846
未完了allow plugins to add controllers and actions to existing permissions
0%
説明
This patch allows a plugin to add his actions to existing permissions, on init.rb should be called like this
add_permission :view_issues, :issues_plugin => [:index,:list,:show]
journals
forgot brackets on example
<pre>
add_permission :view_issues, { :issues_plugin => [:index,:list,:show] }
</pre>
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
this is a pretty simple patch, and posted 2 years ago, there's any chance to get it merged?
--------------------------------------------------------------------------------
Won't [[Plugin_Tutorial#Extending-the-project-menu]] fit your need?
--------------------------------------------------------------------------------
-
--------------------------------------------------------------------------------
-
--------------------------------------------------------------------------------
-
--------------------------------------------------------------------------------
-
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-
--------------------------------------------------------------------------------
this patch expands what is explained in plugin tutorial
it allows plugins to add methods to a permission. For instance if you write a plugin to add issues from another controller, with this patch you can just call
<pre>
add_permission :add_issues, { :issues_plugin => [:new,:create] }
</pre>
instead of adding another permission 'add_issues_2"
--------------------------------------------------------------------------------
Please don't randomly assign tickets to people.
--------------------------------------------------------------------------------
-
--------------------------------------------------------------------------------
-
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
why this patch still wasn't merged?
--------------------------------------------------------------------------------