|
@@ -97,6 +97,9 @@ class RoleUtils {
|
|
|
static parseRole(role: string): Role {
|
|
static parseRole(role: string): Role {
|
|
|
const parts = role.split('_')
|
|
const parts = role.split('_')
|
|
|
|
|
|
|
|
|
|
+ if (parts[0] !== 'ROLE') {
|
|
|
|
|
+ throw new Error('can not parse role')
|
|
|
|
|
+ }
|
|
|
parts.shift()
|
|
parts.shift()
|
|
|
|
|
|
|
|
let action: 'VIEW' | 'CORE' | 'REFERENCE' | '' = ''
|
|
let action: 'VIEW' | 'CORE' | 'REFERENCE' | '' = ''
|