mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: adapt UGs to roles
This commit is contained in:
parent
0df250c729
commit
a6152ef1f5
9 changed files with 265 additions and 70 deletions
|
|
@ -19,6 +19,7 @@ class Permission(BaseModel):
|
|||
class Rights(BaseModel):
|
||||
courses: Permission
|
||||
users: Permission
|
||||
usergroups : Permission
|
||||
collections: Permission
|
||||
organizations: Permission
|
||||
coursechapters: Permission
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ from sqlalchemy import Column, ForeignKey, Integer
|
|||
from sqlmodel import Field, SQLModel
|
||||
|
||||
|
||||
class UserGroupRessource(SQLModel, table=True):
|
||||
class UserGroupResource(SQLModel, table=True):
|
||||
id: Optional[int] = Field(default=None, primary_key=True)
|
||||
usergroup_id: int = Field(
|
||||
sa_column=Column(Integer, ForeignKey("usergroup.id", ondelete="CASCADE"))
|
||||
)
|
||||
ressource_uuid: str = ""
|
||||
resource_uuid: str = ""
|
||||
org_id: int = Field(
|
||||
sa_column=Column(Integer, ForeignKey("organization.id", ondelete="CASCADE"))
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue