We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e204ad1 commit acd0809Copy full SHA for acd0809
app/operation/admin.py
@@ -43,9 +43,9 @@ async def modify_admin(
43
) -> AdminDetails:
44
"""Modify an existing admin's details."""
45
db_admin = await self.get_validated_admin(db, username=username)
46
- if self.operator_type != OperatorType.CLI and db_admin.username == current_admin.username and db_admin.is_sudo:
+ if self.operator_type != OperatorType.CLI and db_admin.is_sudo:
47
await self.raise_error(
48
- message="You're not allowed to edit another sudoer's account. Use pasarguard-cli instead.", code=403
+ message="You're not allowed to modify another sudoer's account. Use pasarguard-cli instead.", code=403
49
)
50
51
db_admin = await update_admin(db, db_admin, modified_admin)
0 commit comments