mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 22:34:56 +00:00
code: nextjs,frontends,users (2 files)
This commit is contained in:
@@ -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[] = [
|
||||
{
|
||||
|
||||
@@ -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'
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user