mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-17 05:20:55 +00:00
* fix: Enforce Terms Acceptance on the Server When modalAcceptance Is On * fix: Mark Backfilled Terms Acceptance Timestamps * test: Cover Server-Enforced Terms Acceptance in the Mock Harness * fix: Gate Management Routes and Skill Sync and Resolve Terms Policy Fail-Closed * fix: Evict Cached Auth Documents When Terms Acceptance Is Reset * fix: Guard Skill Sync Behind Terms Acceptance for Every Skill List Route * fix: Move Terms Skill-Sync Guard Into the API Package and Evict All Users on Reset * fix: Batch Terms Reset Cache Eviction and Sign the Spec User In Fresh * fix: Let Stop Through the Terms Gate, Refresh Startup Config, and Wait Out Failed Eviction * refactor: Narrow the Terms Exemptions and Share One Refusal Path Across Clients * refactor: Compose the JWT Terms Gate Through an API Package Helper * style: Sort Imports for the Shared Terms Refusal Helper * test: Expose the Terms Gate Helper in the JWT Auth Spec Mock * test: Cover the Terms Refusal Code on Pre-Stream Upload Errors
41 lines
1.4 KiB
JavaScript
41 lines
1.4 KiB
JavaScript
const path = require('path');
|
|
require('module-alias')({ base: path.resolve(__dirname, '..', 'api') });
|
|
const mongoose = require('mongoose');
|
|
const { User } = require('@librechat/data-schemas').createModels(mongoose);
|
|
const connect = require('./connect');
|
|
|
|
const listUsers = async () => {
|
|
try {
|
|
await connect();
|
|
const users = await User.find(
|
|
{},
|
|
'email provider avatar username name createdAt termsAccepted termsAcceptedAt termsAcceptedSource',
|
|
);
|
|
|
|
console.log('\nUser List:');
|
|
console.log('----------------------------------------');
|
|
users.forEach((user) => {
|
|
console.log(`ID: ${user._id.toString()}`);
|
|
console.log(`Email: ${user.email}`);
|
|
console.log(`Username: ${user.username || 'N/A'}`);
|
|
console.log(`Name: ${user.name || 'N/A'}`);
|
|
console.log(`Provider: ${user.provider || 'email'}`);
|
|
console.log(`Created: ${user.createdAt}`);
|
|
console.log(`Terms Accepted: ${user.termsAccepted ? 'Yes' : 'No'}`);
|
|
console.log(
|
|
`Terms Accepted At: ${user.termsAcceptedAt ? user.termsAcceptedAt.toISOString() : 'N/A'}${
|
|
user.termsAcceptedSource === 'migration' ? ' (backfilled)' : ''
|
|
}`,
|
|
);
|
|
console.log('----------------------------------------');
|
|
});
|
|
|
|
console.log(`\nTotal Users: ${users.length}`);
|
|
process.exit(0);
|
|
} catch (err) {
|
|
console.error('Error listing users:', err);
|
|
process.exit(1);
|
|
}
|
|
};
|
|
|
|
listUsers();
|