Replies: 2 comments
-
Hi @DavidSprauel, I think it would make sense to introduce wrapper methods for authorization, similar to how it is implemented for operations (e.g. Passing parent entity directly to a policy is an app-specific feature and would result in unexpected behavior for many users. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Maybe it is better to create something like |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
While using Orion I spotted a point that could be enhanced.
I have several entities that are related to the
Company
model likecompanies/{company}/messages
orcompanies/{company}/documents
.I have for each to override store method just to change this :
$this->authorize('create', [$resourceModelClass, $parentEntity]);
That makes a lot of code duplication.
I think that in relation controller, passing the parentKey in authorization would be nice, wouldn't it ?
if you want I can probably make a pull request for this change if it makes sense to you as well.
EDIT: when you override
store
method the response status become a 200 instead of a 201Beta Was this translation helpful? Give feedback.
All reactions