
--- client/views/common/commonPlugin.js
+++ client/views/common/commonPlugin.js
... | ... | @@ -22,6 +22,7 @@ |
22 | 22 |
import { mdiMagnify, mdiFolder, mdiFolderOpen, mdiTable, mdiPlay, mdiKeyVariant, mdiTrashCan } from '@mdi/js'; |
23 | 23 |
import moment from 'moment'; |
24 | 24 |
import Vue from "vue"; |
25 |
+import store from "../pages/AppStore"; |
|
25 | 26 |
|
26 | 27 |
export default { |
27 | 28 |
install(Vue) { |
... | ... | @@ -368,5 +369,22 @@ |
368 | 369 |
Vue.config.globalProperties.$getFullFileTime = function (date) { |
369 | 370 |
return moment(date).format('YYMMDD_HHmmss'); |
370 | 371 |
} |
372 |
+ |
|
373 |
+ Vue.config.globalProperties.$authorChk = function () { |
|
374 |
+ const authList = store.state.loginUser.user_auth; |
|
375 |
+ for (let auth of authList) { |
|
376 |
+ if (auth == "ROLE_ADMIN") { |
|
377 |
+ return "ROLE_ADMIN"; |
|
378 |
+ } |
|
379 |
+ } |
|
380 |
+ |
|
381 |
+ for (let auth of authList) { |
|
382 |
+ if (auth == "ROLE_VIEWER") { |
|
383 |
+ return "ROLE_VIEWER"; |
|
384 |
+ } |
|
385 |
+ } |
|
386 |
+ |
|
387 |
+ return "ROLE_USER"; |
|
388 |
+ } |
|
371 | 389 |
} |
372 | 390 |
}(파일 끝에 줄바꿈 문자 없음) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?