@iac-mchs/ngx-rule-role-access

0.0.0 • 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;
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.0
    1

Package Sidebar

Install

npm i @iac-mchs/ngx-rule-role-access

Weekly Downloads

1

Version

0.0.0

License

ISC

Unpacked Size

44.5 kB

Total Files

35

Last publish

Collaborators

  • nospoon27