Project

General

Profile

Actions

Feature #5095

open

allow plugins to add controllers and actions to existing permissions

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

Status:
New
Priority:
Normal
Assignee:
-
Category:
Plugin API
Target version:
-
Start date:
2010-03-16
Due date:
% Done:

0%

Estimated time:
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]

Files

add_to_permissions_from_plugins.patch (1.22 KB) add_to_permissions_from_plugins.patch patch Lluís Gili, 2010-03-16 13:46
add_to_permissions_from_plugins.patch (1.07 KB) add_to_permissions_from_plugins.patch updated for Redmine 1.3-stable branch Lluís Gili, 2012-03-23 11:59
Actions #1

Updated by Lluís Gili almost 15 years ago

forgot brackets on example

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

Actions #2

Updated by Lluís Gili almost 15 years ago

  • Assignee deleted (Eric Davis)
Actions #3

Updated by Lluís Gili almost 13 years ago

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

Actions #4

Updated by Etienne Massip almost 13 years ago

Won't Plugin_Tutorial fit your need?

Actions #5

Updated by laspariseanicko John over 12 years ago

  • Assignee set to Holger Just

-

Actions #6

Updated by kurtenbagabr billaa over 12 years ago

-

Actions #7

Updated by sheerinjerr aifseng over 12 years ago

-

Actions #8

Updated by burgsgill aifseng over 12 years ago

-

Actions #9

Updated by Etienne Massip over 12 years ago

  • Assignee deleted (Holger Just)
Actions #10

Updated by raankelv John over 12 years ago

  • Assignee set to Anonymous

-

Actions #11

Updated by Lluís Gili over 12 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"

Actions #12

Updated by Anonymous over 12 years ago

  • Assignee deleted (Anonymous)

Please don't randomly assign tickets to people.

Actions #13

Updated by avellinodesm John over 12 years ago

  • Assignee set to Etienne Massip

-

Actions #14

Updated by kirkkent John over 12 years ago

-

Actions #15

Updated by Etienne Massip over 12 years ago

  • Assignee deleted (Etienne Massip)
Actions #16

Updated by Ilya S almost 11 years ago

why this patch still wasn't merged?

Actions

Also available in: Atom PDF