Skip to content

Conversation

PujaDeshmukh17
Copy link
Contributor

Currently a user is able to rename a file even if they do not have SDM roles.

Bug Link: https://itsm.services.sap/nav_to.do?uri=x_sapda_devinc_development_incident.do?sys_id=0c9d1540834f5e54e85fc230feaad3f4%26sysparm_view=Development_Incident

This PR is intended to resolve this issue and throw an error suggesting the user does not have sufficient permissions.

image

@PujaDeshmukh17 PujaDeshmukh17 added the Under Construction The PR is still under construction label Jan 16, 2025
@PujaDeshmukh17 PujaDeshmukh17 removed the Under Construction The PR is still under construction label Jan 16, 2025
if (responseCode == 403) {
// SDM Roles for user are missing
throw new ServiceException(SDMConstants.SDM_MISSING_ROLES_EXCEPTION_MSG, null);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we also capture else condition so that if any other error we just throw Unable to rename due to an error at the server.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

cmisDocument);
if (responseCode == 403) {
// SDM Roles for user are missing
throw new ServiceException(SDMConstants.SDM_MISSING_ROLES_EXCEPTION_MSG, null);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@PujaDeshmukh17 PujaDeshmukh17 merged commit a762aea into develop Jan 23, 2025
8 checks passed
@PujaDeshmukh17 PujaDeshmukh17 deleted the RenameNoSdmRoleBug branch January 23, 2025 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants