permission table add link column for menu

This commit is contained in:
2024-12-24 17:27:44 +09:00
parent 57af07ba73
commit be203cb715
3 changed files with 4 additions and 2 deletions

View File

@@ -84,8 +84,8 @@ class dbuser(crudbase):
db.refresh(db_user)
return db_user
def get_permissions(self,db: Session,user_id: int) -> t.List[schemas.Permission]:
return dbpermission.get_all(db).all()
def get_permissions(self,db: Session) -> t.List[schemas.Permission]:
return db.execute(dbpermission.get_all()).scalars().all()
def get_user_permissions(self,db: Session,user_id: int) -> t.List[schemas.Permission]:
permissions =[]