-
Notifications
You must be signed in to change notification settings - Fork 196
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
Write documentation for roles & permissions concept #1456
Comments
Preliminary draft:Roles and PermissionsRoles and Permissions live in the
The scope of roles and permissions is only inside the The intended usage of Roles and Permissions can be clarified with an example: An admin user wants to configure so that only users with the role Assigning a role to a userWhen assigning a role to a user an assignment is created. An assignment relates an account with a role. DesignRoles and Permissions was built on top of settings bundles, instead of building a service that exclusively deals with them. This API reuses most of what has already been implemented for the settings bundles and extends it with roles and permissions. It does so by adding the When an extension starts, it registers its roles and permissions (as well as the settings bundles, in fact, roles and permissions are just another settings bundle of type TestingIn order to retrieve Roles and Permissions for a given user, these need to be assigned. Let's do so using the API and the Request:micro call com.owncloud.api.settings RoleService.AssignRoleToUser '{"assignment": {"account_uuid": "4c510ada-c86b-4815-8820-42cdf82c3d51", "role_id": "71881883-1768-46bd-a24d-a356a2afdf7f"}}' Response:{
"assignment": {
"id": "9490d020-cfb2-46d8-804c-6b6d088adb62",
"account_uuid": "4c510ada-c86b-4815-8820-42cdf82c3d51",
"role_id": "71881883-1768-46bd-a24d-a356a2afdf7f"
}
} Note: The Now let us retrieve the assignments for the user with ID Request:micro call com.owncloud.api.settings RoleService.ListRoleAssignments '{"account_uuid": "4c510ada-c86b-4815-8820-42cdf82c3d51"}' Response:{
"assignments": [
{
"id": "9490d020-cfb2-46d8-804c-6b6d088adb62",
"account_uuid": "4c510ada-c86b-4815-8820-42cdf82c3d51",
"role_id": "71881883-1768-46bd-a24d-a356a2afdf7f"
}
]
} The Filesystem driverOverview of the /var/tmp/ocis-settings
├── bundles
│ ├── 2a506de7-99bd-4f0d-994e-c38e72c28fd9.json
│ ├── 38071a68-456a-4553-846a-fa67bf5596cc.json
│ ├── 71881883-1768-46bd-a24d-a356a2afdf7f.json
│ └── d7beeea8-8ff4-406b-8fb6-ab2dd81e6b11.json
└── role-assignments
├── 721a5cce-a750-47b2-93c2-5decbab1aa87.json
├── 9490d020-cfb2-46d8-804c-6b6d088adb62.json
└── cf1b10a9-ba30-432e-b3da-4f6be71bcfb1.json
|
Changes:
|
User stories:
Open questions:
|
@kulmann ☝️ |
|
@butonic that's correct. I thought of role inheritance as well, which with this model is a bit hard to map but it was something that was mentioned and I remembered it, therefore added to the doc. It is another point that we'd need to discuss for the MVP. |
For the mvp I‘d advise against role inheritance. A user can have as many roles as you want - data model wise. As long as we’re still learning about requirements it makes sense to compose each of the default roles with their respective full set of permissions. For the UI we agreed to only allow single role assignment. Having multiple roles only makes sense then when we‘re coming up with e.g. group roles. Which is technically possible already. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions. |
Write documentation for roles & permissions concept. This is intended to be a living document and it should reflect decisions made during the development process. The end result being a document in a state that mirrors the settings service functionality regarding roles and permissions.
The text was updated successfully, but these errors were encountered: