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

[AAE-4985] - Make SSO Role Service accept a content admin role that is not part of the JWT token #6942

Merged
merged 9 commits into from Apr 26, 2021

Conversation

arditdomi
Copy link
Contributor

@arditdomi arditdomi commented Apr 22, 2021

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (check one with "x")

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation
  • Other... Please describe:

What is the current behaviour? (You can also link to an open issue here)
https://alfresco.atlassian.net/browse/AAE-4985

What is the new behaviour?
In a new feature, there is the need of checking if the logged in user is an ACS Admin user or not using this service. This information can not become part of the JWT token right now, which means we need to call an ACS API to check that inside this service as it currently completely relies on the JWT token. With the new behaviour it will make an API call to check that the user is an ACS Admin or not, when in the roles array we have the ALFRESCO_ADMINISTRATORS included.

Example:
router.data = { 'roles': ['ALFRESCO_ADMINISTRATORS'] };

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:

Copy link
Contributor

@mauriziovitale mauriziovitale left a comment

Choose a reason for hiding this comment

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

comments

lib/core/services/auth-guard-sso-role.service.spec.ts Outdated Show resolved Hide resolved
lib/core/mock/ecm-user.service.mock.ts Outdated Show resolved Hide resolved
lib/core/services/auth-guard-sso-role.service.spec.ts Outdated Show resolved Hide resolved
lib/core/services/auth-guard-sso-role.service.spec.ts Outdated Show resolved Hide resolved
lib/core/services/auth-guard-sso-role.service.ts Outdated Show resolved Hide resolved
lib/core/services/auth-guard-sso-role.service.ts Outdated Show resolved Hide resolved
lib/core/services/auth-guard-sso-role.service.ts Outdated Show resolved Hide resolved
@arditdomi arditdomi changed the title [AAE-4985] - Make SSO Role Service accept an ACS_ADMIN role that is not part of the JWT token [AAE-4985] - Make SSO Role Service accept a content admin role that is not part of the JWT token Apr 23, 2021
@arditdomi arditdomi force-pushed the dev-adomi-AAE-4985-sso-role-service branch from 496c78b to 794f1b3 Compare April 26, 2021 11:42
@eromano eromano self-requested a review April 26, 2021 13:25
@arditdomi arditdomi merged commit 574db8d into develop Apr 26, 2021
@arditdomi arditdomi deleted the dev-adomi-AAE-4985-sso-role-service branch April 26, 2021 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants