mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 16:21:16 +03:30
crator and messageResponse
This commit is contained in:
+2
-12
@@ -1,16 +1,6 @@
|
||||
import { TokenService } from '@/services'
|
||||
import {$hasRole} from '../acl/role';
|
||||
export default {
|
||||
methods: {
|
||||
$hasRole(roles) {
|
||||
if (TokenService.getToken()) {
|
||||
roles = roles.split('|');
|
||||
for (const role of roles) {
|
||||
if(TokenService.getInfo().roles && Array.isArray(TokenService.getInfo().roles) && TokenService.getInfo().roles.includes(role)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
$hasRole
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user