Skip to content

Commit 4a61fbc

Browse files
fix(admin): update error messages for sudo account modifications to include CLI/TUI usage
1 parent 109c761 commit 4a61fbc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/operation/admin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ async def modify_admin(
4646
db_admin = await self.get_validated_admin(db, username=username)
4747
if self.operator_type != OperatorType.CLI and db_admin.is_sudo:
4848
await self.raise_error(
49-
message="You're not allowed to modify another sudoer's account. Use pasarguard-cli instead.", code=403
49+
message="You're not allowed to modify sudoer's account. Use pasarguard cli / tui instead.", code=403
5050
)
5151

5252
db_admin = await update_admin(db, db_admin, modified_admin)
@@ -65,7 +65,7 @@ async def remove_admin(self, db: AsyncSession, username: str, current_admin: Adm
6565
db_admin = await self.get_validated_admin(db, username=username)
6666
if self.operator_type != OperatorType.CLI and db_admin.is_sudo:
6767
await self.raise_error(
68-
message="You're not allowed to remove sudoer's account. Use pasarguard-cli instead.", code=403
68+
message="You're not allowed to remove sudoer's account. Use pasarguard cli / tui instead.", code=403
6969
)
7070

7171
await remove_admin(db, db_admin)

0 commit comments

Comments
 (0)