SuperAwesome Permissions for NestJS Guard & Decorators

Introduction

SuperAwesome Permissions for NestJS is where the project shines & shows its orthogonal & Aspect Oriented architecture. It provides full support and seamless integration for:

  • SuperAwesome Permissions library, including PermissionDefinitions, ownership hooks and method injection of the automatically created Permit object to accompany every request's lifetime.

  • The NestJS Guard architecture, using the deceptively simple createPermissionsGuard factory function to declaratively configure a specific controller's Guard, passed into nestjs's @UseGuards.

    The Guard is actively allowing or forbidding access to every method/endpoint of your controller, before the method is even executed (if that makes sense).

    The declarative and DRY nature is achieved by the use decorators & introspecting and extracting all possible information from your existing code & runtime, making the whole Authorization (i.e Permissions) architecture aspect oriented & almost completely orthogonal to your application.

How to use

First, you need to understand the basics of how SuperAwesome Permissions works.

Then please continue to:

How to install & configure

To install simply:

  $ npm install @superawesome/permissions @superawesome/permissions-nestjs --save

Make sure @superawesome/permissions version is the right one (as in its peerDependencies).

result-matching ""

    No results matching ""