I've already implemented a function to remove users switch permissions called remove_switch_permissions(). You just need the username of the person who gave permissions and the username of the person who was given permissions to remove somebody's permissions. Maybe clicking the box with the user's name in it on the User Profile page and then putting a prompt to remove their permission, thus activating the function?
I've already implemented a function to remove users switch permissions called
remove_switch_permissions()
. You just need the username of the person who gave permissions and the username of the person who was given permissions to remove somebody's permissions. Maybe clicking the box with the user's name in it on the User Profile page and then putting a prompt to remove their permission, thus activating the function?https://github.com/rropen/absense-planner/blob/9cb1ab09322e6a43eb4d8de861ca64f15aa864f6/ap_src/ap_app/utils/switch_permissions.py#L132-L158