Creates an initial admin password and writes it to the logs. @param ctx database context
(final Context ctx)
| 112 | * @param ctx database context |
| 113 | */ |
| 114 | public synchronized void init(final Context ctx) { |
| 115 | if(file.exists()) return; |
| 116 | |
| 117 | final String pw = UUID.randomUUID().toString(); |
| 118 | get(ADMIN).password(pw); |
| 119 | write(); |
| 120 | ctx.log.writeServer(LogType.INFO, |
| 121 | "Initial " + ADMIN + " password (change after first login): " + pw); |
| 122 | } |
| 123 | |
| 124 | /** |
| 125 | * Adds a user. |