-
Notifications
You must be signed in to change notification settings - Fork 26
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RichardW98 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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
@@ -195,7 +195,7 @@ public AccessResponseDTO createAccessRequestToProject(UUID id, AccessRequestDTO | |||
} | |||
User user = userService.getUserEntityByUsername(accessRequestDTO.getUsername()); | |||
if (isNull(accessRequestDTO.getRole())) { | |||
throw new ResourceNotFoundException("Role cannot be null"); | |||
accessRequestDTO.setRole(com.redhat.parodos.project.enums.Role.DEVELOPER); |
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.
May I ask why this is the correct default role?
Can you please document this behavior?
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.
OWNER, ADMIN and DEVELOPER are the 3 possible roles that a user can have in a project at the moment.
By default, DEVELOPER is used for an access request when the role is not provided in the request payload.
As the UI doesn't support or allow the requester to specify the role (ADMIN or DEVELOPER) for a user, DEVELOPER is currently used as default.
I'll open a PR today to document the entire behaviour :)
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.
Thanks :)
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.
Thanks for the explanation!
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, use
fixes #<issue_number>(, fixes #<issue_number>, ...)
format, where issue_number might be a GitHub issue, or a Jira story (FLPATH-xxxx):Fixes #
Change type
Impacted services
Checklist