From 26ea61dc68f6885cee1ae7970565c0a2dd048262 Mon Sep 17 00:00:00 2001 From: Guo Mingkai Date: Sun, 24 Mar 2024 22:57:15 +0800 Subject: [PATCH] feat: allows user to access underlying casbin enforcer (#166) allows user to access underlying casbin enforcer to make use of any api, such as enforce, making it more flexible --- src/services/authz-management.service.ts | 2 +- src/services/authz-rbac.service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/authz-management.service.ts b/src/services/authz-management.service.ts index 2be5c53..502a093 100644 --- a/src/services/authz-management.service.ts +++ b/src/services/authz-management.service.ts @@ -9,7 +9,7 @@ import * as casbin from 'casbin'; export class AuthZManagementService { constructor( @Inject(AUTHZ_ENFORCER) - private readonly enforcer: casbin.Enforcer + public readonly enforcer: casbin.Enforcer ) {} /** diff --git a/src/services/authz-rbac.service.ts b/src/services/authz-rbac.service.ts index 05b1c5c..e17cff9 100644 --- a/src/services/authz-rbac.service.ts +++ b/src/services/authz-rbac.service.ts @@ -11,7 +11,7 @@ import * as casbin from 'casbin'; export class AuthZRBACService { constructor( @Inject(AUTHZ_ENFORCER) - private readonly enforcer: casbin.Enforcer + public readonly enforcer: casbin.Enforcer ) {} /**