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
fix(permissions): reject malformed doap and ap create/update request (DSP-1328) #1890
fix(permissions): reject malformed doap and ap create/update request (DSP-1328) #1890
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
`hasPermissions` contains permission types that must be granted. See [the complete description of administrative | ||
permission types](../../05-internals/design/api-admin/administration.md#administrative-permissions). | ||
In summary, each permission should contain followings: | ||
- `name` : indicates the type of the type of the permission that can be one of the followings: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably "the type of the type of permission" -> "the type of permission"
- `M` modify permission | ||
- `D`: delete permission | ||
- `CR`: change rights permission (most privileged) | ||
- `permissionCode`: The code assigned to a permission indicating its hierarchical lever. These codes are as below: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"lever" -> "level"?
@@ -88,4 +105,82 @@ object PermissionsMessagesUtilADM { | |||
|
|||
CacheUtil.remove(PermissionsCacheName, key) | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing docs
|
||
/** | ||
* For default object access permission, we need to make sure that the value given for the projectCode matches the value of name parameter. | ||
* This method, validates the content of hasPermissions collection by verifying that both projectCode and name indicate the same type of permission. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is meant by projectCode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hehe that was a permissioncode, sorry for the typo.
resolves DSP-1328
hasPermissions
requests for both AP and DOAPhasPermissions
was malformed.