File tree Expand file tree Collapse file tree 4 files changed +11
-2
lines changed
Expand file tree Collapse file tree 4 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,14 @@ if (import.meta.url === `file://${process.argv[1]}`) {
210210 if ( ! await admin . resource ( 'users' ) . get ( [ Filters . EQ ( 'email' , DEMO_EMAIL ) ] ) ) {
211211 await admin . resource ( 'users' ) . create ( {
212212 email : DEMO_EMAIL ,
213- password_hash : await AdminForth . Utils . generatePasswordHash ( DEMO_PASSWORD ) ,
213+ password_hash : await AdminForth . Utils . generatePasswordHash ( DEMO_PASSWORD ) ,
214+ role : 'user' , // THE DEMO user role is 'user' not 'superadmin', he can't do any destructive actions
215+ } ) ;
216+ }
217+ if ( ! await admin . resource ( 'users' ) . get ( [ Filters . EQ ( 'email' , "admin@adminfoth.dev" ) ] ) ) {
218+ await admin . resource ( 'users' ) . create ( {
219+ email : "admin@adminfoth.dev" ,
220+ password_hash : await AdminForth . Utils . generatePasswordHash ( process . env . ADMIN_PASSWORD ) ,
214221 role : 'user' , // THE DEMO user role is 'user' not 'superadmin', he can't do any destructive actions
215222 } ) ;
216223 }
Original file line number Diff line number Diff line change 2020 - VAULT_HARBOR_KEY
2121 - VAULT_OPENAI_API_KEY
2222 - VAULT_AWS_ACCESS_KEY_ID
23- - VAULT_AWS_SECRET_ACCESS_KEY
23+ - VAULT_AWS_SECRET_ACCESS_KEY
24+ - VAULT_ADMIN_PASSWORD
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ services:
1111 - AWS_ACCESS_KEY_ID=${VAULT_AWS_ACCESS_KEY_ID}
1212 - AWS_SECRET_ACCESS_KEY=${VAULT_AWS_SECRET_ACCESS_KEY}
1313 - DATABASE_FILE_URL=file:./db/live.sqlite
14+ - ADMIN_PASSWORD=${VAULT_ADMIN_PASSWORD}
1415 volumes :
1516 - af-db:/code/db/
1617
You can’t perform that action at this time.
0 commit comments