1
0
mirror of https://github.com/fumiama/paper-manager.git synced 2026-06-08 01:24:55 +08:00

edit roles

This commit is contained in:
源文雨
2023-03-13 21:25:03 +08:00
parent c821776891
commit 4116f971f7
4 changed files with 14 additions and 8 deletions

View File

@@ -1,7 +1,13 @@
export enum RoleEnum {
// super admin
// super admin, all permission granted
SUPER = 'super',
// tester
TEST = 'test',
// can only create / delete account of normal users
ACCOUNT_MANAGER = 'accmgr',
// add / del files + USER's permission
FILE_MANAGER = `filemgr`,
// have the permission of using the normal application
USER = 'user',
}

View File

@@ -24,7 +24,7 @@ const setting: ProjectConfig = {
settingButtonPosition: SettingButtonPositionEnum.AUTO,
// Permission mode
permissionMode: PermissionModeEnum.ROUTE_MAPPING,
permissionMode: PermissionModeEnum.ROLE,
// Permission-related cache is stored in sessionStorage or localStorage
permissionCacheType: CacheTypeEnum.LOCAL,

View File

@@ -57,7 +57,7 @@
import { useGlobSetting } from '/@/hooks/setting'
import { useI18n } from '/@/hooks/web/useI18n'
import { useDesign } from '/@/hooks/web/useDesign'
import { useLocaleStore } from '/@/store/modules/locale'
// import { useLocaleStore } from '/@/store/modules/locale'
defineProps({
sessionTimeout: {
@@ -68,8 +68,8 @@
const globSetting = useGlobSetting()
const { prefixCls } = useDesign('login')
const { t } = useI18n()
const localeStore = useLocaleStore()
const showLocale = localeStore.getShowPicker
// const localeStore = useLocaleStore()
// const showLocale = localeStore.getShowPicker
const title = computed(() => globSetting?.title ?? '')
</script>
<style lang="less">

View File

@@ -114,5 +114,5 @@ function createRule(message: string) {
message,
trigger: 'change',
},
]
] as RuleObject[]
}