From bbd7786c6ce13b374d896a45c23255b8fa3e8bd2 Mon Sep 17 00:00:00 2001 From: Sabir Hassan Date: Sat, 1 Oct 2022 15:06:55 +0500 Subject: [PATCH] fix: remove authProvider attribute from user and group payload interface --- api/public/swagger.yaml | 13 ------------- api/src/model/Group.ts | 6 +----- api/src/model/User.ts | 6 +----- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/api/public/swagger.yaml b/api/public/swagger.yaml index f7f18d4..2fdd04e 100644 --- a/api/public/swagger.yaml +++ b/api/public/swagger.yaml @@ -318,11 +318,6 @@ components: - isAdmin type: object additionalProperties: false - AuthProviderType: - enum: - - ldap - - internal - type: string UserPayload: properties: displayName: @@ -336,10 +331,6 @@ components: password: type: string description: 'Password for user' - authProvider: - $ref: '#/components/schemas/AuthProviderType' - description: 'Identifies the source from which user is created' - example: internal isAdmin: type: boolean description: 'Account should be admin or not, defaults to false' @@ -391,10 +382,6 @@ components: type: string description: 'Description of the group' example: 'This group represents Data Controller Users' - authProvider: - $ref: '#/components/schemas/AuthProviderType' - description: 'Identifies the source from which group is created' - example: 'false' isActive: type: boolean description: 'Group should be active or not, defaults to true' diff --git a/api/src/model/Group.ts b/api/src/model/Group.ts index 0a0c8ef..bf06c9a 100644 --- a/api/src/model/Group.ts +++ b/api/src/model/Group.ts @@ -17,11 +17,6 @@ export interface GroupPayload { * @example "This group represents Data Controller Users" */ description: string - /** - * Identifies the source from which group is created - * @example "false" - */ - authProvider?: AuthProviderType /** * Group should be active or not, defaults to true * @example "true" @@ -33,6 +28,7 @@ interface IGroupDocument extends GroupPayload, Document { groupId: number isActive: boolean users: Schema.Types.ObjectId[] + authProvider?: AuthProviderType } interface IGroup extends IGroupDocument { diff --git a/api/src/model/User.ts b/api/src/model/User.ts index 86b626b..e405317 100644 --- a/api/src/model/User.ts +++ b/api/src/model/User.ts @@ -18,11 +18,6 @@ export interface UserPayload { * Password for user */ password: string - /** - * Identifies the source from which user is created - * @example "internal" - */ - authProvider?: AuthProviderType /** * Account should be admin or not, defaults to false * @example "false" @@ -48,6 +43,7 @@ interface IUserDocument extends UserPayload, Document { autoExec: string groups: Schema.Types.ObjectId[] tokens: [{ [key: string]: string }] + authProvider?: AuthProviderType } export interface IUser extends IUserDocument {