FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

remove preset admin users · devforth/adminforth@14c153f · GitHub

Repository navigation

Commit 14c153f

Browse files
committed
remove preset admin users
1 parent dcaad78 commit 14c153f

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

‎live-demo/app/index.ts‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export const admin = new AdminForth({
8080
options: {
8181
allowedActions: {
8282
edit: false,
83-
delete: false,
83+
// delete: false,
8484
}
8585
},
8686
plugins: [
@@ -552,18 +552,11 @@ if (import.meta.url === `file://${process.argv[1]}`) {
552552
// serve after you added all api
553553
admin.express.serve(app)
554554
admin.discoverDatabases().then(async () => {
555-
if (!await admin.resource('users').get([Filters.EQ('email', 'adminforth')])) {
556-
await admin.resource('users').create({
557-
email: 'adminforth',
558-
password_hash: await AdminForth.Utils.generatePasswordHash('adminforth'),
559-
role: 'superadmin',
560-
});
561-
}
562555
if (!await admin.resource('users').get([Filters.EQ('email', DEMO_EMAIL)])) {
563556
await admin.resource('users').create({
564557
email: DEMO_EMAIL,
565558
password_hash: await AdminForth.Utils.generatePasswordHash(DEMO_PASSWORD ),
566-
role: 'superadmin',
559+
role: 'user',
567560
});
568561
}
569562
});

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL