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

Change scope calculation for committee members #2487

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

luisa-beerboom
Copy link
Member

Closes #2448

Includes appropriate changes to get_user_scope presenter, should probably be used when making the appropriate amendments in the client

@@ -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,
Copy link
Member

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

Copy link
Member Author

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 (
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. The oml is read right in this line at `user.get("organization_management_level")
  2. 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

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

Successfully merging this pull request may close these issues.

Allow committee admins to change personal information
2 participants