Skip to content
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

Command Console - New command effectiveAuthorisations for permissions plugin #163

Merged
merged 1 commit into from
May 11, 2020

Conversation

AFaust
Copy link
Contributor

@AFaust AFaust commented May 11, 2020

CHECKLIST

We will not consider a PR until the following items are checked off--thank you!

  • There aren't existing pull requests attempting to address the issue mentioned here
  • Submission developed in a feature branch--not master

CONVINCING DESCRIPTION

This PR adds a new command to the permissions plugin of the command console. The command "effectiveAuthorisations" allows administrators to check which authorities a particular user has, either globally or in relation to a specific node. The latter variant of this command allows for better analysis of potential permission issues, as the check will include dynamic authorities that may affect the user on node in question, and essentially gives a low-level list of authorities which will be considered by Alfresco during ACL checks.

RELATED INFORMATION

@AFaust AFaust requested review from binduwavell and yregaieg May 11, 2020 10:14
@AFaust AFaust force-pushed the effectiveAuthorisations branch 2 times, most recently from acce08f to 136cec6 Compare May 11, 2020 10:16
// restore
Packages.org.alfresco.repo.security.authentication.AuthenticationUtil.popAuthentication();
}
catch (e)
{

// restore
Packages.org.alfresco.repo.security.authentication.AuthenticationUtil.popAuthentication();
Copy link
Contributor

Choose a reason for hiding this comment

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

If popAuth() throws in 115 above deep in the implementation, you could end up trying to popAuth() again. Seems very unlikely, maybe it would be better to move the popAuth into a finally()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately, there is no finally supported in the Rhino version used in Alfresco, AFAIK. At least I once tried to use it and failed, so I adopted that pattern.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created #169 to track that.

Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately, there is no finally supported in the Rhino version used in Alfresco, AFAIK. At least I once tried to use it and failed, so I adopted that pattern.

Weird, I though I used that inside JS Console a couple of times before !

Copy link
Contributor Author

@AFaust AFaust May 11, 2020

Choose a reason for hiding this comment

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

@yregaieg Yeah, we were talking during the hackathon Zoom session and I am fully prepared to consider that my state of knowledge on that might be seriously outdated because I never tried again. Don't want to change that on a whim here though and thus created that #169 to do a proper verification.

@AFaust AFaust force-pushed the effectiveAuthorisations branch from 136cec6 to cad4c85 Compare May 11, 2020 21:22
@AFaust AFaust merged commit 71d883f into OrderOfTheBee:master May 11, 2020
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.

3 participants