Usage
Import AccessControlModule and inject the service you need.
Basic Import
import { Module } from '@nestjs/common';
import { AccessControlModule, FeaturesService } from '@digiwedge/access-control';
@Module({ imports: [AccessControlModule] })
export class AppModule {
constructor(private readonly features: FeaturesService) {}
}
Create a Feature with Auditing
const created = await features.createFeature(
{ name: 'USER_MGMT', description: 'User management', enabled: true },
{ userId: 'admin' } as any,
{ tenantId: 'tenant-1', performedBy: 'admin' },
);