Revoke all permissions from Authenticator.blocked_users

rather than only disabling login, fully block the user from Hub operations
by removing all group membership and role assignments
This commit is contained in:
Min RK
2024-08-12 13:48:05 +02:00
parent a377f8bc7f
commit 6be699c333
4 changed files with 123 additions and 2 deletions

View File

@@ -1234,6 +1234,8 @@ class APIToken(Hashed, Base):
orm_token.expires_at = cls.now() + timedelta(seconds=expires_in)
db.commit()
if return_orm:
return orm_token
return token
def update_scopes(self, new_scopes):