Skip to content

How to declare several permission files in the a module #1000

@Triskae

Description

@Triskae

In the example below we only have 1 permission file per module.

import { Module } from '@nestjs/common';
import { CaslModule } from 'nest-casl';

import { permissions } from './post.permissions';

@Module({
  imports: [CaslModule.forFeature({ permissions })],
})
export class PostModule {}

For a bigger module, can I have several permission files and declared them in the parent module ? In order to keep seperate files for each "entity" in the module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions