@wmfs/tymly
Advanced tools
Comparing version 1.16.2 to 1.17.0
@@ -0,1 +1,23 @@ | ||
# [1.17.0](https://github.com/wmfs/tymly-core/compare/v1.16.2...v1.17.0) (2018-08-23) | ||
### ✨ Features | ||
* RBAC service removed - it's pulled out into tymly-rbac-plugin ([137e9c2](https://github.com/wmfs/tymly-core/commit/137e9c2)) | ||
### 📦 Code Refactoring | ||
* Collapsed getUserRoles/checkRoleAuthorization into a single checkAuthorization call ([b5ac48e](https://github.com/wmfs/tymly-core/commit/b5ac48e)) | ||
### 🚨 Tests | ||
* Disable RBAC tests again ([461a618](https://github.com/wmfs/tymly-core/commit/461a618)) | ||
### ♻️ Chores | ||
* Bump tymly-test-helper to 1.1.1 ([e1756f2](https://github.com/wmfs/tymly-core/commit/e1756f2)) | ||
## [1.16.2](https://github.com/wmfs/tymly-core/compare/v1.16.1...v1.16.2) (2018-08-22) | ||
@@ -2,0 +24,0 @@ |
@@ -9,4 +9,2 @@ 'use strict' | ||
const ENABLE_RBAC = false | ||
function promiseOrCallback (p, callback) { | ||
@@ -212,4 +210,4 @@ if (callback) { | ||
authorisationCheck (userId, stateMachineName, executionOptions, action) { | ||
if (!ENABLE_RBAC) { | ||
return [true] // STUB! | ||
if (!this.services.rbac) { | ||
return [true] // No RBAC service installed. Just continue. | ||
} | ||
@@ -223,7 +221,5 @@ | ||
const roles = await rbac.getUserRoles(userId) | ||
const authorised = rbac.checkRoleAuthorization( | ||
const authorised = await rbac.checkAuthorization( | ||
userId, | ||
executionOptions, | ||
roles, | ||
'stateMachine', | ||
@@ -230,0 +226,0 @@ stateMachineName, |
{ | ||
"name": "@wmfs/tymly", | ||
"version": "1.16.2", | ||
"version": "1.17.0", | ||
"description": "A framework for building and sharing workflows in Node.js", | ||
@@ -60,3 +60,3 @@ "author": "West Midlands Fire Service", | ||
"@semantic-release/git": "7.0.1", | ||
"@wmfs/tymly-test-helpers": "1.1.0" | ||
"@wmfs/tymly-test-helpers": "1.1.1" | ||
}, | ||
@@ -63,0 +63,0 @@ "scripts": { |
@@ -17,4 +17,4 @@ 'use strict' | ||
serviceClass: TestService3, | ||
bootBefore: ['testService1', 'rbac'], | ||
bootBefore: ['testService1', 'statebox'], | ||
bootAfter: ['inventory'] | ||
} |
@@ -39,7 +39,6 @@ /* eslint-env mocha */ | ||
'blueprintDocs', | ||
'testService3', | ||
'registry', | ||
'categories', | ||
'statebox', | ||
'testService3', | ||
'rbac', | ||
'testService1', | ||
@@ -46,0 +45,0 @@ 'testService2' |
Sorry, the diff of this file is not supported yet
29
277054
234
8137