Feature #5095

allow plugins to add controllers and actions to existing permissions

Added by Lluís Gili over 11 years ago. Updated almost 8 years ago.

Status:NewStart date:2010-03-16
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Plugin API
Target version:-
Resolution:

Description

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]

add_to_permissions_from_plugins.patch Magnifier - patch (1.22 KB) Lluís Gili, 2010-03-16 13:46

add_to_permissions_from_plugins.patch Magnifier - updated for Redmine 1.3-stable branch (1.07 KB) Lluís Gili, 2012-03-23 11:59

History

#1 Updated by Lluís Gili over 11 years ago

forgot brackets on example

add_permission :view_issues, { :issues_plugin => [:index,:list,:show] }

#2 Updated by Lluís Gili over 11 years ago

  • Assignee deleted (Eric Davis)

#3 Updated by Lluís Gili over 9 years ago

this is a pretty simple patch, and posted 2 years ago, there's any chance to get it merged?

#4 Updated by Etienne Massip over 9 years ago

Won't Plugin_Tutorial fit your need?

#5 Updated by laspariseanicko John over 9 years ago

  • Assignee set to Holger Just

-

#6 Updated by kurtenbagabr billaa over 9 years ago

-

#7 Updated by sheerinjerr aifseng over 9 years ago

-

#8 Updated by burgsgill aifseng over 9 years ago

-

#9 Updated by Etienne Massip over 9 years ago

  • Assignee deleted (Holger Just)

#10 Updated by raankelv John over 9 years ago

  • Assignee set to Anonymous

-

#11 Updated by Lluís Gili over 9 years ago

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

add_permission :add_issues, { :issues_plugin => [:new,:create] }

instead of adding another permission 'add_issues_2"

#12 Updated by Anonymous over 9 years ago

  • Assignee deleted (Anonymous)

Please don't randomly assign tickets to people.

#13 Updated by avellinodesm John over 9 years ago

  • Assignee set to Etienne Massip

-

#14 Updated by kirkkent John over 9 years ago

-

#15 Updated by Etienne Massip over 9 years ago

  • Assignee deleted (Etienne Massip)

#16 Updated by Ilya S almost 8 years ago

why this patch still wasn't merged?

Also available in: Atom PDF