Project

General

Profile

Actions

Refactor #8947

open

Determine the action_permission from the permission block

Added by Ivan Necas over 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Users, Roles and Permissions
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Currently, when having action that are not represented by it's own permission (such as
canceling a task requires `edit_task` as opposed to `cancel_task` permission) one needs
to define the mapping both when defining the permissions (`permission { 'api/tasks' => [:cancel] }`)
for checking the routes, and redefine the `action_permission` in the controller for `find_resource`
purposes.

It would be more convenient if the `action_permission` method would be able to load the needed
permission from the permission definition (overriding would still be possible if needed).

No data to display

Actions

Also available in: Atom PDF