1.0.2 • Published 3 years ago

@doce/ngx-rbac v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

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>
PropertiesTypeDescription
rulesDoStringDictionary\<DoRuleType> | DoRuleTypeInput a rules here to provide them on the current level
rolesDoRuleType[]Input a roles here to provide them on the current level

Guard

DoCanGuard
ArgumentsTypeDescription
rulesstring[]The array of rule names

Pipe

doCan

ArgumentsTypeDescription
rulesstring | AllPossibleCheckers[] | AllPossibleCheckers | DoRuleTypeTest 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\

{
    [key: string]: T;
}

DoRolePermissionType

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

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago