mirror of
https://github.com/directus/directus.git
synced 2026-01-21 03:58:06 -05:00
Fix non-admin role creation via cli for SQLite (#15723)
* fix non-admin role creation via cli * use the more objectively correct solution Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
This commit is contained in:
@@ -15,7 +15,7 @@ export default async function rolesCreate({ role: name, admin }: { role: string;
|
||||
const schema = await getSchema();
|
||||
const service = new RolesService({ schema: schema, knex: database });
|
||||
|
||||
const id = await service.createOne({ name, admin_access: admin });
|
||||
const id = await service.createOne(admin ? { name, admin_access: admin } : { name });
|
||||
process.stdout.write(`${String(id)}\n`);
|
||||
database.destroy();
|
||||
process.exit(0);
|
||||
|
||||
Reference in New Issue
Block a user