Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #14000 - respect custom controller permissions #3267

Conversation

domcleal
Copy link
Contributor

@domcleal domcleal commented Mar 2, 2016

Allows controller_permission method to override the permission suffix
used in resource_scope, originally from a63aa7c and removed in bb39df2.

Allows controller_permission method to override the permission suffix
used in resource_scope, originally from a63aa7c and removed in bb39df2.
@ShimShtein
Copy link
Member

👍 Sounds like a missing extension point.

I wonder what is so special in config templates, since it is the only place that actually needs it...

@domcleal
Copy link
Contributor Author

domcleal commented Mar 2, 2016

The config_templates controller manages the ProvisioningTemplate model, so permissions all have _provisioning_template suffixes rather than being named after the controller. The main controller for the model is provisioning_templates, but this one still exists for API v2 compatibility after the model was renamed.

@iNecas
Copy link
Member

iNecas commented Mar 3, 2016

👍

@dLobatog
Copy link
Member

dLobatog commented Mar 7, 2016

Merged as f05b930, thanks @domcleal!

@dLobatog dLobatog closed this Mar 7, 2016
@mrcamp
Copy link

mrcamp commented Aug 4, 2016

Which Foreman version is this fix included in? I'm on 1.11.3 and am getting the same problem when using apipie-bindings:

I, [2016-08-04T09:21:08.100588 #83995] INFO : Server: https://myforemanserver.net I, [2016-08-04T09:21:08.100617 #83995] INFO : GET /api/config_templates/83 D, [2016-08-04T09:21:08.364572 #83995] DEBUG : 404 Resource Not Found {"message"=>"Resource config_template not found by id '83'"}

Querying the same URL with curl and the browser works correctly, and querying any other resource with a specific ID works correctly everywhere.

@domcleal
Copy link
Contributor Author

domcleal commented Aug 8, 2016

It was in 1.11.0-RC2. I'd suggest debugging it from the server side and filing a bug in Redmine if an issue remains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants