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

Created Requirement service #1162

Merged

Conversation

mpRegalado
Copy link
Member

This PR creates a requirement service that makes it simpler to generate requirement objects with the appropriate resources.
It contains several dictionaries that contain the information showed in the RBAC Reference

It contains several functions:

  • getAction: returns an action string given a key
  • getResource: returns a resource string given a key and optional paramter
  • generateRequirement: constructs a requirement object given an action key, an array of resource keys and array of parameters
  • generateRequirementFactory: returns an array of used resource keys and a method to generate a requirement object given an array of parameters based on an action key.

Closes #1159

To test

  • Given the attached patch file is installed using git apply requirementService.txt - requirementService.txt
  • When the browser navigates to Overview Welcome
  • Then several console logs appear showing several resources and requirement objects

@mpRegalado mpRegalado requested a review from a team October 15, 2021 11:08
@mpRegalado mpRegalado self-assigned this Oct 15, 2021
Copy link
Member

@asteriscos asteriscos left a comment

Choose a reason for hiding this comment

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

LGTM ✔️

Copy link
Contributor

@CPAlejandro CPAlejandro left a comment

Choose a reason for hiding this comment

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

CR: LGTM!
Testing: LGTM!

AlexRuiz7 added a commit that referenced this pull request Oct 20, 2021
@AlexRuiz7 AlexRuiz7 changed the base branch from 4.2-8.1 to epic/rbac-implementation October 26, 2021 09:02
@AlexRuiz7 AlexRuiz7 merged commit bf6d18c into epic/rbac-implementation Oct 26, 2021
@AlexRuiz7 AlexRuiz7 linked an issue Oct 26, 2021 that may be closed by this pull request
4 tasks
@frankeros frankeros deleted the feature/1159_RBAC_requirement-service branch October 26, 2021 11:49
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.

Create dictionary for permissions
4 participants