r/BookStack • • Jan 28 '26

Default role with OIDC

Hi there,

I'd like to give a default role to users when they login for the first time with OIDC SSO enabled.

It's a docker deployment with external MySQL DB.

I've added this to my .env

APP_PUBLIC=true
APP_DEFAULT_PUBLIC_ROLE=guest_oidc
OIDC_DEFAULT_ROLE=11

(11 is the id of the guest_oidc role in the DB)

I gave this role to some shelves I want public but anytime a user reach the page with his active SSO he won't get the role assigned.

Any idea where to investigate?

4 Upvotes

4 comments sorted by

View all comments

Show parent comment

1

u/mmeinert Jan 28 '26

Yes, ChatGPT gave me this :/
Your solution worked directly, thank you

Now I have to let my books/chapters/pages inherits permissions of the shelf they depends on. Seems trickier but I'll search first in the documentation before asking some AI.

Regards

3

u/ssddanbrown Jan 28 '26

Shelf permissions don't cascade to lower items, unless you copy the permissions to child books (can be done via the permissions page for a shelf, or there's also a CLI command).

It's generally easier to keep things at the book level when it comes to permission management.

1

u/mmeinert Jan 28 '26

Thank you very much