mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2024-11-19 01:43:42 +01:00
fixup!
This commit is contained in:
parent
d11df332b3
commit
03789176d9
@ -247,8 +247,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,
|
||||
)
|
||||
|
||||
|
@ -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"""
|
||||
|
@ -201,6 +201,7 @@ dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
||||
[tool.ruff.lint.pep8-naming]
|
||||
classmethod-decorators = [
|
||||
"root_validator",
|
||||
"validator",
|
||||
]
|
||||
|
||||
[tool.ruff.lint.mccabe]
|
||||
|
Loading…
Reference in New Issue
Block a user