fastapi-permissions
fastapi-permissions copied to clipboard
Can't access pydantic principals
I create a pydantic model following the example described in package readme:
class SuperUser(BaseModel):
username: Optional[str]
def principals(self):
return ["group:admin"]
But when I call get_active_principals function, it does not append the principal prop from superuser class...I think pydantic does not allow this.