-
Notifications
You must be signed in to change notification settings - Fork 7
[SNOW:DINC0374643] Adding a check for sdm roles while renaming attachments #80
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
Conversation
if (responseCode == 403) { | ||
// SDM Roles for user are missing | ||
throw new ServiceException(SDMConstants.SDM_MISSING_ROLES_EXCEPTION_MSG, null); | ||
} |
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.
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.
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.
Done.
cmisDocument); | ||
if (responseCode == 403) { | ||
// SDM Roles for user are missing | ||
throw new ServiceException(SDMConstants.SDM_MISSING_ROLES_EXCEPTION_MSG, null); |
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.
same comment as above
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.
Done.
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.