@nebular/security
Advanced tools
Comparing version 2.0.0-rc.9 to 2.0.0-rc.10
@@ -217,4 +217,4 @@ (function (global, factory) { | ||
return this.roleProvider.getRole() | ||
.pipe(rxjs_operators.map(function (role) { | ||
return _this.acl.can(role, permission, resource); | ||
.pipe(rxjs_operators.map(function (role) { return Array.isArray(role) ? role : [role]; }), rxjs_operators.map(function (roles) { | ||
return roles.some(function (role) { return _this.acl.can(role, permission, resource); }); | ||
})); | ||
@@ -221,0 +221,0 @@ }; |
{ | ||
"name": "@nebular/security", | ||
"version": "2.0.0-rc.9", | ||
"version": "2.0.0-rc.10", | ||
"description": "@nebular/security", | ||
@@ -35,4 +35,4 @@ "main": "./bundles/security.umd.js", | ||
"@angular/router": "^6.0.0", | ||
"rxjs": "~5.5.5" | ||
"rxjs": "^6.1.0" | ||
} | ||
} |
@@ -39,4 +39,4 @@ import { Injectable } from '@angular/core'; | ||
return this.roleProvider.getRole() | ||
.pipe(map(function (role) { | ||
return _this.acl.can(role, permission, resource); | ||
.pipe(map(function (role) { return Array.isArray(role) ? role : [role]; }), map(function (roles) { | ||
return roles.some(function (role) { return _this.acl.can(role, permission, resource); }); | ||
})); | ||
@@ -43,0 +43,0 @@ }; |
@@ -8,3 +8,7 @@ /** | ||
export declare abstract class NbRoleProvider { | ||
abstract getRole(): Observable<string>; | ||
/** | ||
* Returns current user role | ||
* @returns {Observable<string | string[]>} | ||
*/ | ||
abstract getRole(): Observable<string | string[]>; | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54229
755