diff --git a/services/web/app/src/infrastructure/mongodb.js b/services/web/app/src/infrastructure/mongodb.js index 7fc1039140..aa7aa4ac44 100644 --- a/services/web/app/src/infrastructure/mongodb.js +++ b/services/web/app/src/infrastructure/mongodb.js @@ -49,7 +49,6 @@ const db = { githubSyncUserCredentials: internalDb.collection('githubSyncUserCredentials'), globalMetrics: internalDb.collection('globalMetrics'), grouppolicies: internalDb.collection('grouppolicies'), - groupAuditLogEntries: internalDb.collection('groupAuditLogEntries'), institutions: internalDb.collection('institutions'), messages: internalDb.collection('messages'), migrations: internalDb.collection('migrations'), diff --git a/services/web/app/src/models/GroupAuditLogEntry.js b/services/web/app/src/models/GroupAuditLogEntry.js deleted file mode 100644 index 3bda4ebf95..0000000000 --- a/services/web/app/src/models/GroupAuditLogEntry.js +++ /dev/null @@ -1,23 +0,0 @@ -const mongoose = require('../infrastructure/Mongoose') -const { Schema } = mongoose - -const GroupAuditLogEntrySchema = new Schema( - { - groupId: { type: Schema.Types.ObjectId, index: true }, - info: { type: Object }, - initiatorId: { type: Schema.Types.ObjectId }, - ipAddress: { type: String }, - operation: { type: String }, - timestamp: { type: Date, default: Date.now }, - }, - { - collection: 'groupAuditLogEntries', - minimize: false, - } -) - -exports.GroupAuditLogEntry = mongoose.model( - 'GroupAuditLogEntry', - GroupAuditLogEntrySchema -) -exports.GroupAuditLogEntrySchema = GroupAuditLogEntrySchema diff --git a/services/web/frontend/js/utils/meta.ts b/services/web/frontend/js/utils/meta.ts index 6c7209a5bb..7aab88b050 100644 --- a/services/web/frontend/js/utils/meta.ts +++ b/services/web/frontend/js/utils/meta.ts @@ -103,7 +103,6 @@ export interface Meta { 'ol-gitBridgeEnabled': boolean 'ol-gitBridgePublicBaseUrl': string 'ol-github': { enabled: boolean; error: boolean } - 'ol-groupAuditLogs': [] 'ol-groupId': string 'ol-groupName': string 'ol-groupPlans': GroupPlans diff --git a/services/web/migrations/20250409155536_group_audit_log_index.mjs b/services/web/migrations/20250409155536_group_audit_log_index.mjs deleted file mode 100644 index 282b3c6d2d..0000000000 --- a/services/web/migrations/20250409155536_group_audit_log_index.mjs +++ /dev/null @@ -1,35 +0,0 @@ -/* eslint-disable no-unused-vars */ - -import Helpers from './lib/helpers.mjs' - -const tags = ['saas'] - -const indexes = [ - { - key: { - groupId: 1, - timestamp: 1, - }, - name: 'groupId_1_timestamp_1', - }, -] - -const migrate = async client => { - const { db } = client - await Helpers.addIndexesToCollection(db.groupAuditLogEntries, indexes) -} - -const rollback = async client => { - const { db } = client - try { - await Helpers.dropIndexesFromCollection(db.groupAuditLogEntries, indexes) - } catch (err) { - console.error('Something went wrong rolling back the migrations', err) - } -} - -export default { - tags, - migrate, - rollback, -} diff --git a/services/web/test/acceptance/src/helpers/groupSSO.mjs b/services/web/test/acceptance/src/helpers/groupSSO.mjs index c5bde77236..f7efeb9e63 100644 --- a/services/web/test/acceptance/src/helpers/groupSSO.mjs +++ b/services/web/test/acceptance/src/helpers/groupSSO.mjs @@ -34,7 +34,7 @@ export const baseSsoConfig = { userIdAttribute, } // the database also sets enabled and validated, but we cannot set that in the POST request for /manage/groups/:ID/settings/sso -export async function createGroupSSO(SSOConfigValidated = true) { +export async function createGroupSSO() { const nonSSOMemberHelper = await UserHelper.createUser() const nonSSOMember = nonSSOMemberHelper.user @@ -47,7 +47,7 @@ export async function createGroupSSO(SSOConfigValidated = true) { const ssoConfig = new SSOConfig({ ...baseSsoConfig, enabled: true, - validated: SSOConfigValidated, + validated: true, }) await ssoConfig.save() @@ -68,14 +68,12 @@ export async function createGroupSSO(SSOConfigValidated = true) { const enrollmentUrl = getEnrollmentUrl(subscriptionId) const internalProviderId = getProviderId(subscriptionId) - if (SSOConfigValidated) { - await linkGroupMember( - memberUser.email, - memberUser.password, - subscriptionId, - 'mock@email.com' - ) - } + await linkGroupMember( + memberUser.email, + memberUser.password, + subscriptionId, + 'mock@email.com' + ) const userHelper = new UserHelper()