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

Support swapping default roles #2868

Merged
merged 4 commits into from
Feb 20, 2022
Merged

Commits on Feb 20, 2022

  1. Support swapping default roles

    Pseudocode:
    
    ```
    A. patchRole(role1, default=True):
    B.   set role1.default = True
         for all users:
           add role1 to user.roles
    C.   for role in roles if role != role1:
           set role.default = False
           for all users:
             delete role from user.roles
    ```
    
    This ensures that changeDescription for the role(s) and user(s) are updated accordingly.
    
    Potential optimization:
    Adding role1 and removing role from user.roles could be considered/implemented as one change.
    However, increases code complexity.
    mithmatt committed Feb 20, 2022
    Configuration menu
    Copy the full SHA
    85fad31 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0d079a4 View commit details
    Browse the repository at this point in the history
  3. Fix tests

    mithmatt committed Feb 20, 2022
    Configuration menu
    Copy the full SHA
    111ce6c View commit details
    Browse the repository at this point in the history
  4. Fix code smell

    mithmatt committed Feb 20, 2022
    Configuration menu
    Copy the full SHA
    4024d10 View commit details
    Browse the repository at this point in the history