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

Provisioning of custom users/roles including global rights #1499

Closed
1 of 2 tasks
ZuitAMB opened this issue Oct 25, 2023 · 3 comments · Fixed by #1504
Closed
1 of 2 tasks

Provisioning of custom users/roles including global rights #1499

ZuitAMB opened this issue Oct 25, 2023 · 3 comments · Fixed by #1504
Assignees
Labels
blockchain Indicates blockchain related issue or feature feature Indicates a new feature implementation

Comments

@ZuitAMB
Copy link

ZuitAMB commented Oct 25, 2023

  • The feature was discussed internally in a TruBudget deployment project.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Description 💡

TruBudget's provisioning can be used to automatically generate TruBudget data, including users, groups and projects.
At the moment, the assignment of global permissions to users is hardcoded in users_and_groups.js.

A dynamic assignment of permissions defined in users.json would allow us to create custom users with a custom selection of permissions. (For example, users with reading permissions only, another user with technical/blockchain permissions and a third one with project creation rights)

A possible user.json entry could look like:

{
    "id": "CustomProjectReader",
    "displayName": "Project Reader A",
    "password": "test",
    "permissions": ["project.list", "project.viewDetails"]
  }

As a developer, I would like to automatically provision TruBudget (functional) users including specific global permissions.

@ZuitAMB ZuitAMB added the feature Indicates a new feature implementation label Oct 25, 2023
@issuelabeler issuelabeler bot added the blockchain Indicates blockchain related issue or feature label Oct 25, 2023
@mayrmartin mayrmartin added this to the TruBudget 2.4.0 milestone Oct 25, 2023
@egdmrsy
Copy link
Contributor

egdmrsy commented Oct 27, 2023

Slight issue with the example user.json entry: project.list and project.viewDetails are not global permissions. Those permissions are given to the users per project basis and stored under projects. Same goes for subprojects and workflows.

@ZuitAMB
Copy link
Author

ZuitAMB commented Oct 27, 2023

Alright, so only global rights:

{
    "id": "CustomProjectCreator",
    "displayName": "Project Creator A",
    "password": "test",
    "permissions": ["global.createProject", "network.list"]
  }

@egdmrsy
Copy link
Contributor

egdmrsy commented Oct 30, 2023

Feature PR is ready for review. Additional note: For users who should have all permissions, to avoid longer json file, it is enough to just add "all" to the permissions array. Provisioning service will ignore any other permissions in the array and will automatically grant all available permissions in this case. Example:

All permissions granted to the user adminA
{ "id": "adminA", "displayName": "Admin A", "password": "test", "permissions": ["all"] }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blockchain Indicates blockchain related issue or feature feature Indicates a new feature implementation
Projects
None yet
3 participants