Not authorized to perform an action that does not modify the resource #3561
-
Description:When running an action on a table row resource I'm seeing "Sorry, you are not authorized to perform this action". The resource has an application policy allowing viewAny and view, but not authorized else. The action is not modifying the resource (its a download PDF button). If I allow update permissions the action runs, but then the user can edit the resource through the nova interface, which I do not want. Is there a work around or a way of allowing the action to run without the resource being editable? I've searched the docs and can't find one, but its possible/probable I have missed something. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
|
It's peculiar this thread isn't more popular, I've also run into this issue and I'm trying to find a way to allow users to run actions but not edit/delete entire resources. |
Beta Was this translation helpful? Give feedback.
-
|
This has come up in issues before, but the logic for Orion is: "If the user cannot edit or delete a resource, they are not allowed to run actions that potentially do the same thing against the resource". Modifying this mid-series would be a breaking change. The next series update will use the following logic order:
|
Beta Was this translation helpful? Give feedback.
-
|
This is really unfortunate. We should at least be able to define a method on the action that overrides the default permission check, without introducing a breaking change, right? |
Beta Was this translation helpful? Give feedback.
This has come up in issues before, but the logic for Orion is: "If the user cannot edit or delete a resource, they are not allowed to run actions that potentially do the same thing against the resource". Modifying this mid-series would be a breaking change.
The next series update will use the following logic order:
canRunon the Action.runActionorrunDestructiveActionon the underlying model policy.updateordeleteon the underlying model policy or return false.