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, self,
db: Session, db: Session,
capabilities: list[UserCapability], capabilities: list[UserCapability],
) -> bool: ) -> None:
for capability in capabilities: for capability in capabilities:
# TODO if capability not in self.capabilities:
pass cap = models.UserCapability(
user_name=self.name,
capability=capability.value,
)
db.add(cap)
return True db.commit()
class DistinguishedNameBase(BaseModel): class DistinguishedNameBase(BaseModel):