公共 API 参考(@saas/contracts + @core/saas-kit + apps/api 对外接口)
    Preparing search index...

    角色/授权管理门面端点(module-rbac-dynamic-roles §2.5·S3·甲裁自建角色 + 丁裁随片授权面)。

    授权在我·数据在 DB:每端点声明 @Can(<动作>, 'Role'|'RoleGrant'),由 AuthorizationGuard 携 ALS 角色经 CASL(规则源 = 本租户 DB grant 行)裁决;通过后委派 OrganizationRbacAdminService 落库(写侧过 domain 策略闸 + 同通道审计行 + 写后失效投影缓存)。BA 内置 create-role/roles 端点 维持封堵(甲裁不代建→本片自建),本门面是租户差异化授权策略的唯一入口。

    @Can 落点与 seed 一致:owner/admin 持 Role(create/read/update/delete) + RoleGrant (create/read/delete),member 无 → 非管理员请求由守卫 403(fail-closed)。

    Index
    • 为角色新增授权格(同格多条件行 = OR 并集)。

      Parameters

      • dto: {
            action: "create" | "read" | "update" | "delete" | "cancel";
            conditions?: Record<string, unknown>;
            roleKey: string;
            subject:
                | "Organization"
                | "Member"
                | "Invitation"
                | "Workspace"
                | "Role"
                | "RoleGrant";
        }

        授权载荷(roleKey/subject/action/conditions)。

      Returns Promise<void>

    • 撤权(conditions 缺省 = 整 subject 级行;传对象 = 精确撤单条件行)。

      Parameters

      • dto: {
            action: "create" | "read" | "update" | "delete" | "cancel";
            conditions?: Record<string, unknown>;
            roleKey: string;
            subject:
                | "Organization"
                | "Member"
                | "Invitation"
                | "Workspace"
                | "Role"
                | "RoleGrant";
        }

        撤权载荷(roleKey/subject/action/conditions)。

      Returns Promise<void>