mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 23:21:05 +03:30
new correction
This commit is contained in:
+1
@@ -3,6 +3,7 @@ import { TokenService } from '@/services'
|
||||
const $hasRole = function(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;
|
||||
|
||||
Reference in New Issue
Block a user