This commit is contained in:
sajjad
2023-10-18 01:22:06 -07:00
parent b16da8ab41
commit 98aa208766
157 changed files with 28673 additions and 13308 deletions
+16
View File
@@ -0,0 +1,16 @@
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;
}
}
}
};
export {
$hasRole
}