فهرست منبع

Omit grantedUsers

Shun Miyazawa 1 سال پیش
والد
کامیت
caeb96be41

+ 0 - 1
apps/app/src/features/openai/interfaces/ai-assistant.ts

@@ -30,7 +30,6 @@ export interface AiAssistant {
   pagePathPatterns: string[],
   vectorStore: Ref<VectorStore>
   owner: Ref<IUser>
-  grantedUsers?: IUser[]
   grantedGroups?: IGrantedGroup[]
   shareScope: AiAssistantShareScope
   ownerAccessScope: AiAssistantOwnerAccessScope

+ 0 - 7
apps/app/src/features/openai/server/models/ai-assistant.ts

@@ -43,13 +43,6 @@ const schema = new Schema<AiAssistantDocument>(
       ref: 'User',
       required: true,
     },
-    grantedUsers: [
-      {
-        type: Schema.Types.ObjectId,
-        ref: 'User',
-        required: true,
-      },
-    ],
     grantedGroups: {
       type: [{
         type: {

+ 0 - 9
apps/app/src/features/openai/server/routes/ai-assistant.ts

@@ -62,15 +62,6 @@ export const createAiAssistantFactory: CreateAssistantFactory = (crowi) => {
       .notEmpty()
       .withMessage('pagePathPatterns must not be empty'),
 
-    body('grantedUsers')
-      .optional()
-      .isArray()
-      .withMessage('grantedUsers must be an array'),
-
-    body('grantedUsers.*') // each item of grantedUsers
-      .isMongoId()
-      .withMessage('grantedUsers must be an array mongoId'),
-
     body('grantedGroups')
       .optional()
       .isArray()