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

How to add custom access that does not belong to a module to a user #1369

Open
sveneberth opened this issue Jan 14, 2025 · 0 comments
Open
Labels
bug(fix) Something isn't working or address a specific issue or vulnerability help wanted Extra attention is needed viur-meeting Issues to discuss in the next ViUR meeting

Comments

@sveneberth
Copy link
Member

sveneberth commented Jan 14, 2025

For example a user should get the access scriptor.

If this user has his access via roles, he cannot have role:custom, so I cannot choose the access:scriptor.

I can add role:scriptor (add conf.user.roles["scriptor"] = "Scriptor" in e.g. main.py)
), but since this does not belong to any module, it wouldn't be collected.

So to get this running I need to extend UserSkel.toDB with:

if "scriptor" in skel["roles"]:
    access.add("scriptor")
@sveneberth sveneberth added bug(fix) Something isn't working or address a specific issue or vulnerability help wanted Extra attention is needed viur-meeting Issues to discuss in the next ViUR meeting labels Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug(fix) Something isn't working or address a specific issue or vulnerability help wanted Extra attention is needed viur-meeting Issues to discuss in the next ViUR meeting
Projects
None yet
Development

No branches or pull requests

1 participant