give admin user "admin" capability

This commit is contained in:
Jörn-Michael Miehe 2022-03-20 00:12:37 +00:00
parent e955927644
commit 21411694e8

View file

@ -128,12 +128,16 @@ class User(UserBase):
self,
db: Session,
capabilities: list[UserCapability],
) -> bool:
) -> None:
for capability in capabilities:
# TODO
pass
if capability not in self.capabilities:
cap = models.UserCapability(
user_name=self.name,
capability=capability.value,
)
db.add(cap)
return True
db.commit()
class DistinguishedNameBase(BaseModel):