@doce/ngx-rbac
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

NgxRbac


Roles and rules based access control library for angular version 1.

Installation

To install this library, run:

$ npm install @doce/ngx-rbac --save 

Tools

Component

<do-provide-rules></do-provide-rules>
Properties Type Description
rules DoStringDictionary<DoRuleType> | DoRuleType Input a rules here to provide them on the current level
roles DoRuleType[] Input a roles here to provide them on the current level

Guard

DoCanGuard
Arguments Type Description
rules string[] The array of rule names

Pipe

doCan

Arguments Type Description
rules string | AllPossibleCheckers[] | AllPossibleCheckers | DoRuleType Test criteria

Functions

For Roles:

For Permissions:

For Rules:

Logical:

Explanations


AllPossibleCheckers

DoRuleType | DoRoleType | DoCheckerFunction | string;

DoRuleSet

{
    [ruleName: string]: AllPossibleCheckers[]
}

DoRuleOptions

{
  absentRuleBehavior?: DoAbsentRuleBehavior;
  groupName?: string;
}

DoCheckerFunction

(args: any[], dependency: Dependency) => boolean

Dependency

[DoRoleType[], DoStringDictionary<DoRuleType>]

DoRuleType

{
    addPermissionsOf(child: DoRolePermissionType): void;
    addRule(rule: DoRuleType | DoStringDictionary<DoRuleType>): void;
}

DoStringDictionary<T>

{
    [key: string]: T;
}

DoRolePermissionType

{
    can: DoStringDictionary<DoRuleType>;
    canNames: string[];
    name: string;
}

Package Sidebar

Install

npm i @doce/ngx-rbac

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

630 kB

Total Files

92

Last publish

Collaborators

  • docentovich