diff --git a/ui/src/api/config.ts b/ui/src/api/config.ts index 5df606e075..cca49c66b3 100644 --- a/ui/src/api/config.ts +++ b/ui/src/api/config.ts @@ -669,9 +669,48 @@ export const createVersionNameCheck = (bizId: string, appId: number, name: strin * 从配置模板导入配置文件 * @param bizId 业务ID * @param appId 应用ID - * @param bindingId 模板和服务绑定关系ID * @param params 更新参数 * @returns */ export const importConfigFromTemplate = (bizId: string, appId: number, query: any) => http.post(`/config/biz/${bizId}/apps/${appId}/template_bindings/import_template_set`, query); + +/** + * 获取权限设置用户列表 + * @param bizId 业务ID + * @param appId 应用ID + * @param params 更新参数 + * @returns + */ +export const getUserPrivileges = (bizId: string, appId: number, params: ICommonQuery) => + http.get(`/config/biz/${bizId}/apps/${appId}/user_privileges`, { params }); + +/** + * 获取权限设置用户组列表 + * @param bizId 业务ID + * @param appId 应用ID + * @param params 更新参数 + * @returns + */ +export const getUserGroupPrivileges = (bizId: string, appId: number, params: ICommonQuery) => + http.get(`/config/biz/${bizId}/apps/${appId}/user_group_privileges`, { params }); + +/** + * 删除权限设置用户组列表项 + * @param bizId 业务ID + * @param appId 应用ID + * @param id 列表项ID + * @returns + */ +export const deleteUserGroupPrivilege = (bizId: string, appId: number, id: number) => + http.delete(`/config/biz/${bizId}/apps/${appId}/user_group_privileges/${id}`); + +/** + * 删除权限设置用户列表项 + * @param bizId 业务ID + * @param appId 应用ID + * @param id 列表项ID + * @returns + */ +export const deleteUserPrivilege = (bizId: string, appId: number, id: number) => + http.delete(`/config/biz/${bizId}/apps/${appId}/user_privileges/${id}`); diff --git a/ui/src/components/custom-selector.vue b/ui/src/components/custom-selector.vue new file mode 100644 index 0000000000..a6a87860db --- /dev/null +++ b/ui/src/components/custom-selector.vue @@ -0,0 +1,126 @@ + + + + + + + diff --git a/ui/src/components/diff/file.vue b/ui/src/components/diff/file.vue index fd95abcab7..ffcb0a1515 100644 --- a/ui/src/components/diff/file.vue +++ b/ui/src/components/diff/file.vue @@ -12,10 +12,14 @@
{{ `${t('用户')}:` }} {{ props.basePermission.user }} + UID: + {{ props.basePermission.uid }}
{{ `${t('用户组')}:` }} {{ props.basePermission.user_group }} + GID: + {{ props.basePermission.gid }}
@@ -49,6 +53,10 @@ {{ props.currentPermission.user }} + UID: + + {{ props.currentPermission.uid }} +
{{ `${t('用户组')}:` }} @@ -56,6 +64,11 @@ :class="['value', { diff: props.currentPermission.user_group !== props.basePermission.user_group }]"> {{ props.currentPermission.user_group }} + GID: + + {{ props.currentPermission.gid }} +
@@ -91,6 +104,8 @@ privilege: string; user: string; user_group: string; + uid: number; + gid: number; } const { t } = useI18n(); diff --git a/ui/src/components/diff/index.vue b/ui/src/components/diff/index.vue index 0f81ec4373..68920eb8e1 100644 --- a/ui/src/components/diff/index.vue +++ b/ui/src/components/diff/index.vue @@ -38,18 +38,18 @@ { if (!props.diff.base.permission) return; return `${t('权限')}:${props.diff.current.permission?.privilege} -${t('用户')}:${props.diff.current.permission?.user} -${t('用户组')}:${props.diff.current.permission?.user_group}`; +${t('用户')}:${props.diff.current.permission?.user} UID:${props.diff.current.permission?.uid} +${t('用户组')}:${props.diff.current.permission?.user_group} GID:${props.diff.current.permission?.gid}`; }); const basePermission = computed(() => { if (!props.diff.base.permission) return; return `${t('权限')}:${props.diff.base.permission?.privilege} -${t('用户')}:${props.diff.base.permission?.user} -${t('用户组')}:${props.diff.base.permission?.user_group}`; +${t('用户')}:${props.diff.base.permission?.user} UID:${props.diff.current.permission?.uid} +${t('用户组')}:${props.diff.base.permission?.user_group} GID:${props.diff.current.permission?.gid}`; }); // 打开全屏 diff --git a/ui/src/components/permission-input-picker.vue b/ui/src/components/permission-input-picker.vue index 22472c35dc..bd949d96d6 100644 --- a/ui/src/components/permission-input-picker.vue +++ b/ui/src/components/permission-input-picker.vue @@ -9,7 +9,7 @@