code: nextjs,frontends,users (2 files)

This commit is contained in:
2025-12-25 22:38:55 +00:00
parent 690bc59244
commit 2a0fbabd29
2 changed files with 2 additions and 2 deletions

View File

@@ -410,7 +410,7 @@ const DEFAULT_DROPDOWN_CONFIGS: DropdownConfig[] = [
*/
export async function seedDefaultData(): Promise<void> {
// Create default users if none exist
const users = await getUsers()
const users = await getUsers({ scope: 'all' })
if (users.length === 0) {
const defaultUsers: User[] = [
{

View File

@@ -12,7 +12,7 @@ export async function getUsers(ctx: SecurityContext): Promise<User[]> {
'user',
'READ',
async () =>
Database.getUsers(ctx.user.tenantId ? { tenantId: ctx.user.tenantId } : undefined),
Database.getUsers(ctx.user.tenantId ? { tenantId: ctx.user.tenantId } : { scope: 'all' }),
'all_users'
)
}