Comparing version 0.2.22 to 0.2.23
@@ -8,4 +8,3 @@ "use strict"; | ||
return (ctx, next) => { | ||
const mocked = ctx.app.config.kauth.mockHandler; | ||
if (mocked || ctx.isPermitted(value)) { | ||
if (ctx.isPermitted(value)) { | ||
return next(); | ||
@@ -12,0 +11,0 @@ } |
@@ -6,6 +6,2 @@ "use strict"; | ||
isPermitted(value) { | ||
const mocked = this.app.config.kauth.mockHandler; | ||
if (mocked) { | ||
return true; | ||
} | ||
const target = new kauth_sdk_node_1.PermissionCore(); | ||
@@ -12,0 +8,0 @@ target.setParts(typeof value === 'string' ? value : value.name); |
@@ -0,1 +1,10 @@ | ||
## [0.2.23](https://gitlab-ag.marmot-cloud.com/marmot/kauth-sdk-egg/compare/v0.2.22...v0.2.23) (2021-01-25) | ||
### Bug Fixes | ||
* do not permit when mocked ([157b191](https://gitlab-ag.marmot-cloud.com/marmot/kauth-sdk-egg/commit/157b19118fa60e79aa32147dd221fc2142d50107)) | ||
## [0.2.22](https://gitlab-ag.marmot-cloud.com/marmot/kauth-sdk-egg/compare/v0.2.21...v0.2.22) (2021-01-22) | ||
@@ -2,0 +11,0 @@ |
{ | ||
"name": "egg-kauth", | ||
"version": "0.2.22", | ||
"version": "0.2.23", | ||
"description": "egg kauth plugin", | ||
@@ -5,0 +5,0 @@ "eggPlugin": { |
28878
451