Skip to content

RoleModel

Bases: PumCustomBaseModel

RoleModel represents a database role with associated permissions. Attributes: name: Name of the role. permissions: List of permissions associated with the role. inherit: Optional name of another role to inherit permissions from. description: Optional description of the role.

Source code in pum/config_model.py
class RoleModel(PumCustomBaseModel):
    """
    RoleModel represents a database role with associated permissions.
    Attributes:
        name: Name of the role.
        permissions: List of permissions associated with the role.
        inherit: Optional name of another role to inherit permissions from.
        description: Optional description of the role.
    """

    name: str = Field(..., description="Name of the role.")
    permissions: List[PermissionModel] = Field(
        default_factory=list, description="List of permissions for the role."
    )
    inherit: Optional[str] = Field(None, description="Name of the role to inherit from.")
    description: Optional[str] = Field(None, description="Description of the role.")