OSS-first docs
These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.
Check if a user has a specific permission.
Goal
Authorization check before sensitive operations.
Context
Called by other services to verify permissions.
Source Definition
import { defineCommand, defineQuery } from '@lssm-tech/lib.contracts-spec';
import { ScalarTypeEnum, SchemaModel } from '@lssm-tech/lib.schema';
import { SuccessResultModel } from './user';
export const CheckPermissionContract = defineQuery({
meta: {
key: 'identity.rbac.check',
version: '1.0.0',
stability: 'stable',
owners: ['@platform.identity-rbac'],
tags: ['identity', 'rbac', 'check', 'permission'],
description: 'Check if a user has a specific permission.',
goal: 'Authorization check before sensitive operations.',
context: 'Called by other services to verify permissions.',
},
io: {
input: CheckPermissionInputModel,
output: PermissionCheckResultModel,
},
policy: {
auth: 'user',
},
});