owncloud / owncloud/ocis

Custom Roles not working

Open
#9,293 9 comments 0 reactions 0 assignees View on GitHub
Type:Bug
Dominant language
Go
Stars
2.1k
Forks
274
Avg merge
2d 1h
Merged PRs (30d)
103

Description

## Describe the bug
We followed the steps in https://owncloud.dev/services/settings/#custom-roles, and verified that the env var SETTINGS_BUNDLE_PATH is set correctly and the custom_roles.json is mounted correctly on the Docker Container, but the new custom role does not show up in the Webui - as stated in the link above.

## Steps to reproduce
1. Follow the steps in https://owncloud.dev/services/settings/#custom-roles to create a custom role in a json file.
2. Restart OCIS and log in as admin and edit one of the users. In the Role drop down list, the new custom role does not show up.

## Expected behavior
The new custom role should show up in the Role drop down list.
According to https://owncloud.dev/services/settings/#custom-roles, " // DisplayName of the role used in webui".

## Actual behavior
The new custom role does not show up.

## Setup
Ubuntu server with Docker.
owncloud/ocis:5.0.0-rc.5
postgres:alpine
traefik:v2.9.1
quay.io/keycloak/keycloak:21.1

We upgraded to
owncloud/ocis:latest (5.1.0-prealpha+bbc148649)
quay.io/keycloak/keycloak:24.0.1
traefik:v2.9.1
postgres:alpine

ownCloud Infinite Scale
Edition Community
Version 5.1.0-prealpha+bbc148649
Web client version 9.0.0-alpha.1

but the custom role still not working.

We followed the instructions here: https://owncloud.dev/ocis/deployment/ocis_keycloak/
We used the deployment example in ocis/deployments/examples/ocis_keycloak/.
Everything works except for the custom role.


This the custom roles json file:

>
> ~ $ cat /etc/ocis/fcustom_roles.json
> [
> {
> "id": "8b442a1d-2040-44a0-8c73-7ce270cf183f", // ID of the role. Recommendation is to use a random uuidv4. But any unique string will do.
> "name": "user-client", // Internal name of the role. This is used by the system to identify the role. Any string will do here, but it should be unique among the other roles.
> "type": "TYPE_ROLE", // Always use `TYPE_ROLE`
> "extension": "ocis-roles", // Always use `ocis-roles`
> "displayName": "User Client", // DisplayName of the role used in webui
> "settings": [
> {
> "id": "11516bbd-7157-49e1-b6ac-d00c820f980b",
> "name": "PublicLink.Write",
> "displayName": "Write publiclink",
> "description": "This permission allows creating public links.",
> "permissionValue": {
> "operation": "OPERATION_WRITE",
> "constraint": "CONSTRAINT_ALL"
> },
> "resource": {
> "type": "TYPE_SHARE"
> }
> }
> ], // Permissions attached to the role. See Details below.
> "resource": {
> "type": "TYPE_SYSTEM" // Always use `TYPE_SYSTEM`
> }
> }
> ]
> ~ $
>

This is the SETTINGS_BUNDLE_PATH env variable:

~ $ printenv
PROXY_ROLE_ASSIGNMENT_DRIVER=oidc
SETTINGS_BUNDLE_PATH=/etc/ocis/custom_roles.json

## Additional context
NA

Thank you very much.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.