mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-21 03:10:50 +00:00
Group role (#2993)
* feat: app/dataset support group (#2898) * pref: member-group (#2862) * feat: group list ordered by updateTime * fix: transfer ownership of group when deleting member * fix: i18n fix * feat: can not set member as admin/owner when user is not active * fix: GroupInfoModal hover input do not change color * fix(fe): searchinput do not scroll * feat: app collaborator with group, remove default permission * feat: dataset collaborator with group, remove default permission * chore(test): pref mock * chore: remove useless code * chore: adjust * fix: add self as collaborator when creating folder * fix(fe): folder manage menu do not show when user has write permission only * fix: dataset folder create * feat: Add code comment * Pref: app move (#2952) * perf: app schema * doc --------- Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
import React from 'react';
|
||||
import MyModal from '@fastgpt/web/components/common/MyModal';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { PermissionValueType } from '@fastgpt/global/support/permission/type';
|
||||
import CollaboratorContextProvider, { MemberManagerInputPropsType } from '../MemberManager/context';
|
||||
import { Box, Button, Flex, HStack, ModalBody, useDisclosure } from '@chakra-ui/react';
|
||||
import Avatar from '@fastgpt/web/components/common/Avatar';
|
||||
import DefaultPermissionList from '../DefaultPerList';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import ResumeInherit from '../ResumeInheritText';
|
||||
import { ChangeOwnerModal } from '../ChangeOwnerModal';
|
||||
@@ -14,11 +12,6 @@ export type ConfigPerModalProps = {
|
||||
avatar?: string;
|
||||
name: string;
|
||||
|
||||
defaultPer: {
|
||||
value: PermissionValueType;
|
||||
defaultValue: PermissionValueType;
|
||||
onChange: (v: PermissionValueType) => Promise<any>;
|
||||
};
|
||||
managePer: MemberManagerInputPropsType;
|
||||
isInheritPermission?: boolean;
|
||||
resumeInheritPermission?: () => void;
|
||||
@@ -30,7 +23,6 @@ export type ConfigPerModalProps = {
|
||||
const ConfigPerModal = ({
|
||||
avatar,
|
||||
name,
|
||||
defaultPer,
|
||||
managePer,
|
||||
isInheritPermission,
|
||||
resumeInheritPermission,
|
||||
@@ -66,17 +58,6 @@ const ConfigPerModal = ({
|
||||
<ResumeInherit onResume={resumeInheritPermission} />
|
||||
</Box>
|
||||
)}
|
||||
<Box mt={5}>
|
||||
<Box fontSize={'sm'}>{t('common:permission.Default permission')}</Box>
|
||||
<DefaultPermissionList
|
||||
mt="1"
|
||||
per={defaultPer.value}
|
||||
defaultPer={defaultPer.defaultValue}
|
||||
isInheritPermission={isInheritPermission}
|
||||
onChange={(v) => defaultPer.onChange(v)}
|
||||
hasParent={hasParent}
|
||||
/>
|
||||
</Box>
|
||||
<Box mt={4}>
|
||||
<CollaboratorContextProvider
|
||||
{...managePer}
|
||||
|
Reference in New Issue
Block a user