Bug #11408
closedPlugin permissions are broken when using multiple selects
Description
In app/helpers/layout_helper.rb, this:
permission = "view_#{klass.to_s.underscore.pluralize}"
causes problems with foreman_salt:
ERF42-5434 [Foreman::Exception]: unknown permission view_foreman_salt/salt_environments
Is it something I'm doing in particular in Salt that's causing this? It worked fine before this change.
Updated by Stephen Benjamin over 9 years ago
- Related to Bug #11187: Taxonomy selectors are empty even for users with assign permissions added
Updated by The Foreman Bot over 9 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman_salt/pull/45 added
- Pull request deleted (
)
Updated by Stephen Benjamin over 9 years ago
- Related to Bug #11409: Removed unused taxonomix mixin added
Updated by Stephen Benjamin over 9 years ago
- Subject changed from Plugin permissions are broken to Plugin permissions are broken when using multiple selects
- Status changed from Ready For Testing to New
- Pull request added
- Pull request deleted (
https://github.com/theforeman/foreman_salt/pull/45)
Ah, it's not the taxonomix mixin - It's because I'm using multiple_selects which calls this "authorized_assocations" method that had its logic changed.
Updated by Stephen Benjamin over 9 years ago
- Related to deleted (Bug #11409: Removed unused taxonomix mixin)
Updated by Dominic Cleal over 9 years ago
The idea is that you should probably alias chain the method to insert an appropriate view permission for that model. I've been thinking that it should perhaps have a better API, but I'm not sure what it'd look like.
Updated by Stephen Benjamin over 9 years ago
I could for now, but that doesn't seem ideal, foreman should provide an interface to get the custom permission from the klass.
Even better would be if permissions were DRYer. Magically generating the names doesn't work for plugins, and we already have a lot of this info in action_permission in the controllers, which for the vast majority of them only deal with CRUD and a single model. It'd be better if we'd store all this in one place.
Updated by The Foreman Bot over 9 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman_salt/pull/46 added
- Pull request deleted (
)
Updated by Stephen Benjamin over 9 years ago
- Pull request https://github.com/theforeman/foreman/pull/2619 added
- Pull request deleted (
https://github.com/theforeman/foreman_salt/pull/46)
Updated by Dominic Cleal over 9 years ago
- Status changed from Ready For Testing to New
- Pull request added
- Pull request deleted (
https://github.com/theforeman/foreman/pull/2619)
Updated by Stephen Benjamin over 9 years ago
- Is duplicate of Bug #12118: AssociationAuthorizer should ask model for alternative permission names added
Updated by Stephen Benjamin over 9 years ago
- Status changed from New to Duplicate
#12118 handles this case