0.0.0 • Published 1 year ago

@iac-mchs/ngx-rule-role-access v0.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year 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;
}
0.0.0

1 year ago