-
Notifications
You must be signed in to change notification settings - Fork 24
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
Change scope calculation for committee members #2487
base: main
Are you sure you want to change the base?
Change scope calculation for committee members #2487
Conversation
@@ -30,7 +31,7 @@ def __repr__(self) -> str: | |||
class UserScopeMixin(BaseServiceProvider): | |||
def get_user_scope( | |||
self, id_or_instance: int | dict[str, Any] | |||
) -> tuple[UserScope, int, str]: | |||
) -> tuple[UserScope, int, str, list[int]]: | |||
""" | |||
Parameter id_or_instance: id for existing user or instance for user to create | |||
Returns the scope of the given user id together with the relevant scope id (either meeting, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing description of new return value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
lock_result=False, | ||
use_changed_models=False, | ||
) | ||
if user.get("organization_management_level") in ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you forget to read the oml and additionally you should have a test to detect this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The oml is read right in this line at `user.get("organization_management_level")
- This code is in case the user is a super- or orga-admin because in this case he is implicitly also allowed to above any committee_admin for the sake of the user_scope
Closes #2448
Includes appropriate changes to get_user_scope presenter, should probably be used when making the appropriate amendments in the client