feat(server): ban account (#10761)

close CLOUD-158
This commit is contained in:
forehalo
2025-03-12 02:52:18 +00:00
parent cd63e0ed8b
commit ea72599bde
15 changed files with 215 additions and 76 deletions

View File

@@ -618,6 +618,9 @@ type InviteUserType {
"""User email verified"""
createdAt: DateTime @deprecated(reason: "useless")
"""User is disabled"""
disabled: Boolean
"""User email"""
email: String
@@ -767,6 +770,9 @@ type Mutation {
addContextDoc(options: AddContextDocInput!): [CopilotContextListItem!]!
addWorkspaceFeature(feature: FeatureType!, workspaceId: String!): Boolean!
approveMember(userId: String!, workspaceId: String!): Boolean!
"""Ban an user"""
banUser(id: String!): UserType!
cancelSubscription(idempotencyKey: String @deprecated(reason: "use header `Idempotency-Key`"), plan: SubscriptionPlan = Pro, workspaceId: String): SubscriptionType!
changeEmail(email: String!, token: String!): UserType!
changePassword(newPassword: String!, token: String!, userId: String): Boolean!
@@ -810,6 +816,9 @@ type Mutation {
deleteUser(id: String!): DeleteAccount!
deleteWorkspace(id: String!): Boolean!
"""Reenable an banned user"""
enableUser(id: String!): UserType!
"""Create a chat session"""
forkCopilotSession(options: ForkChatSessionInput!): String!
generateLicenseKey(sessionId: String!): String!
@@ -864,7 +873,7 @@ type Mutation {
updateRuntimeConfigs(updates: JSONObject!): [ServerRuntimeConfigType!]!
updateSubscriptionRecurring(idempotencyKey: String @deprecated(reason: "use header `Idempotency-Key`"), plan: SubscriptionPlan = Pro, recurring: SubscriptionRecurring!, workspaceId: String): SubscriptionType!
"""Update a user"""
"""Update an user"""
updateUser(id: String!, input: ManageUserInput!): UserType!
"""update user enabled feature"""
@@ -1359,6 +1368,9 @@ type UserType {
"""User email verified"""
createdAt: DateTime @deprecated(reason: "useless")
"""User is disabled"""
disabled: Boolean!
"""User email"""
email: String!