docs: def check_user_permissions(payload, user_pk):
      """Raise ``PermissionDenied`` if ``payload`` includes ``user_pk``."""
      for perm_type in ['add', 'remove']:
          user_pks = payload.get('users', {}).get(perm_type, {}).keys()
          if user_pk in user_pks:
              raise exceptions.PermissionDenied("You cannot change your own permissions")