This commit is contained in:
dni ⚡
2024-10-17 10:36:51 +02:00
parent cc37dd35fe
commit c001d50553
3 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -231,8 +231,8 @@ async def get_user(account: Account, conn: Optional[Connection] = None) -> User:
updated_at=account.updated_at,
extensions=extensions,
wallets=wallets,
admin=account.is_super_user or account.is_admin or False,
super_user=account.is_super_user or False,
admin=account.is_admin,
super_user=account.is_super_user,
has_password=account.password_hash is not None,
)
+1 -1
View File
@@ -125,7 +125,7 @@ class Account(BaseModel):
@property
def is_admin(self) -> bool:
return self.id in settings.lnbits_admin_users
return self.id in settings.lnbits_admin_users or self.is_super_user
def hash_password(self, password: str) -> str:
"""sets and returns the hashed password"""