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

Restructure Roles #392

Open
kdmnk opened this issue Jan 3, 2024 · 4 comments · May be fixed by #566
Open

Restructure Roles #392

kdmnk opened this issue Jan 3, 2024 · 4 comments · May be fixed by #566
Assignees
Labels
refactor/rebase Changing the structure of the code or modifying representations

Comments

@kdmnk
Copy link
Contributor

kdmnk commented Jan 3, 2024

I was also thinking on making the roles time constrained. That way, we could have regular collegists, plus an additional resident role that is set to be valid for 1 year/indefinite. We can also use that for guests, instead of the guest_until attribute and solve #291. (Also, the general collegist role is also valid only until the end of their studies by default which we can set this way).

@machiato32 what do you think, does putting effort into this would worth it? (We have some time to work on this, the earliest this will be relevant is next summer)

I'm starting to like this idea. The role_user table would have a created_at and valid_until field, and we would use a global scope to filter on those. This way, we don't delete roles just invalidate them, making a log out of the table.

Originally posted by @kdmnk in #358 (comment)

@kdmnk kdmnk added the refactor/rebase Changing the structure of the code or modifying representations label Jan 18, 2024
@viktorcsimma viktorcsimma self-assigned this Jul 10, 2024
@viktorcsimma
Copy link
Contributor

I think I'll take this up; it's probably going to be important soon.

@kdmnk
Copy link
Contributor Author

kdmnk commented Jul 10, 2024

Nice. One more thing: does it make sense to have a boolean flag for stating that a role is indefinite or time constrained? If it is time constrained the validity has to be set when the role is attached to the user

@viktorcsimma
Copy link
Contributor

Hm... but the new resident role could be either indefinite or time-constrained, so I don't know how that could be implemented. I would rather omit that for now.

@viktorcsimma viktorcsimma linked a pull request Jul 11, 2024 that will close this issue
@viktorcsimma
Copy link
Contributor

viktorcsimma commented Jul 14, 2024

No, you are right; we need it for the UI. It would be odd for each and every role to put a date picker next to the name:D

Hm... but the new resident role could be either indefinite or time-constrained, so I don't know how that could be implemented. I would rather omit that for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor/rebase Changing the structure of the code or modifying representations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants