Project

General

Profile

Actions

Bug #8919

open

Allow specifying custom resource name for authorization purposes from within a plugin/model

Added by Ivan Necas about 9 years ago. Updated almost 3 years ago.

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

Description

By default when determining the resource_type to be used for a model authorization, the name of the model class is used.
This behaviour is hard to change from within a plugin, as the logic is included in just one method
https://github.com/theforeman/foreman/blob/1.7.1/app/services/authorizer.rb#L115-L127.

My case is the foreman-tasks (http://projects.theforeman.org/issues/4450/) where there is an STI on the task model,
so the default name would be `dynflow_task`, while the desired name is just `task`.

Actions #1

Updated by Dominic Cleal about 9 years ago

  • Category set to Users, Roles and Permissions
Actions #2

Updated by Dominic Cleal over 7 years ago

Actions #3

Updated by Anonymous almost 7 years ago

  • Status changed from Assigned to New
  • Assignee deleted (Ivan Necas)
Actions #4

Updated by Tomer Brisker over 5 years ago

  • Target version deleted (1.7.2)
Actions #5

Updated by Leos Stejskal almost 3 years ago

  • Triaged changed from No to Yes
Actions

Also available in: Atom PDF