mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-27 16:33:49 +00:00
purge old permission (#2118)
* chore: purge old permission - remove useless role of teamMember - Cleanup auth apis' Props and Return type Definitions * chore: a better way of RequireAtLeastOne Signed-off-by: Finley Ge <m13203533462@163.com> --------- Signed-off-by: Finley Ge <m13203533462@163.com>
This commit is contained in:
@@ -1,18 +1,17 @@
|
||||
import { AuthModeType } from '../type';
|
||||
import { AuthModeType, AuthResponseType } from '../type';
|
||||
import { DatasetFileSchema } from '@fastgpt/global/core/dataset/type';
|
||||
import { parseHeaderCert } from '../controller';
|
||||
import { getFileById } from '../../../common/file/gridfs/controller';
|
||||
import { BucketNameEnum } from '@fastgpt/global/common/file/constants';
|
||||
import { CommonErrEnum } from '@fastgpt/global/common/error/code/common';
|
||||
import { OwnerPermissionVal, ReadPermissionVal } from '@fastgpt/global/support/permission/constant';
|
||||
import { AuthPropsType, AuthResponseType } from '../type/auth';
|
||||
import { Permission } from '@fastgpt/global/support/permission/controller';
|
||||
|
||||
export async function authFile({
|
||||
fileId,
|
||||
per = OwnerPermissionVal,
|
||||
...props
|
||||
}: AuthPropsType & {
|
||||
}: AuthModeType & {
|
||||
fileId: string;
|
||||
}): Promise<
|
||||
AuthResponseType & {
|
||||
|
Reference in New Issue
Block a user