Skip to content

Commit

Permalink
Allow access to metadata if no data permissions (#12816)
Browse files Browse the repository at this point in the history
* remove conditional

* clean up variables and add test coverage

* cleanup

* same path error fix

* fix comment
  • Loading branch information
Monkeychip committed Oct 14, 2021
1 parent 28bd5c3 commit 6b42f5d
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 79 deletions.
4 changes: 2 additions & 2 deletions ui/app/routes/vault/cluster/secrets/backend/secret-edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ export default Route.extend(UnloadModelRoute, {
versionModel = await version.reload();
}
} catch (error) {
// cannot read the version data, but can write according to capabilities-self endpoint
if (error.httpStatus === 403 && capabilities.get('canUpdate')) {
// cannot read the data endpoint but still allow them to see show page to access metadata if they have permissions
if (error.httpStatus === 403) {
// versionModel is then a partial model from the metadata (if we have read there), or
// we need to create one on the client
if (version) {
Expand Down

0 comments on commit 6b42f5d

Please sign in to comment.