@nestrx/access-control
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

ACCESS CONTROL

The module encryption AES GCM for NestJS framework.

Installation

npm:

npm i @nestrx/access-control

yan

yan add @nestrx/access-control

Configure

app.module.ts

...
@Module({
	...
	imports: [
		...
		AccessControlModule,
		...
	],
	...
})
...

Usage

your.controller.ts

...
@Controller('route')
export class YourController{

	@Get()
	@Role() // default user role
	action(@Query() query: any): string{
		// todo something
	}
	@Post()
	@Role('admin')
	adminAccess(@Body() data: any, @User('id') accessBy: string): string{
		// todo something
	}
}
...

Readme

Keywords

none

Package Sidebar

Install

npm i @nestrx/access-control

Weekly Downloads

3

Version

0.0.2

License

MIT

Unpacked Size

8.59 kB

Total Files

17

Last publish

Collaborators

  • zinzinday