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

Create more sofisticated user rights #310

Open
bpatrik opened this issue May 23, 2021 · 3 comments
Open

Create more sofisticated user rights #310

bpatrik opened this issue May 23, 2021 · 3 comments

Comments

@bpatrik
Copy link
Owner

bpatrik commented May 23, 2021

Currently there are 4+1 types of users with fixed right settings in the app (see: https://github.com/bpatrik/pigallery2/blob/master/USERRIGHTS.md)

Furthermore all users can see the whole gallery and it cannot be split up.

This FR proposes to replace the rigid user roles into separate rights, like:
from:

{
name: "John",
role:"Admin"
}
{
name:"John",
rights:[
"writingSettings",
"listing gallery",
"searching",
"sharing"
]
}

This FR would not resolve #81, #188, #129, #301 but would take a step into that direction and would enable future gallery changing features #76, #305

@kagahd
Copy link
Contributor

kagahd commented May 26, 2021

Why not defining roles this way?

{
role:"Admin",
rights:[
"writingSettings",
"listing gallery",
"searching",
"sharing"
]
}

And then associate the role to the user as you did already:

{
name: "John",
role:"Admin"
}

Or did I misunderstand you?

@bpatrik
Copy link
Owner Author

bpatrik commented May 28, 2021

The first one is what kinda we have now.

What I can image is to have a (hardcoded) role template, but the app user could override them per user level.

So instead of specifying for a give feature what kind of role you need:

@ConfigProperty({type: UserRoles})
writeAccessMinRole: UserRoles = UserRoles.Admin;
@ConfigProperty({type: UserRoles})
readAccessMinRole: UserRoles = UserRoles.User;

We can specify for a user what kind of rights it has. It would be more similar to what linux does with groups.

The main reason behind it is that on my personal app I never want to see any delete, rotate etc. button, but people keep asking: #76, #305 This feature would eventually allow it.

@andiohn
Copy link

andiohn commented Nov 18, 2022

I would love the ability to only give users album access and the whole gallery be restricted. For instance; my family can see pictures I mark in an album. Can´t see others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants