changed default storage file, styled permission buttons
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -51,7 +51,7 @@ public class Application {
|
||||
public static void main(String[] args) throws Exception {
|
||||
var argMap = map(args);
|
||||
Optional<Path> basePath = argMap.get(BASE_PATH) instanceof Path p ? Optional.of(p) : empty();
|
||||
var storageFile = (argMap.get(CONFIG_PATH) instanceof Path p ? p : configDir(APP_NAME).resolve("config.json")).toFile();
|
||||
var storageFile = (argMap.get(CONFIG_PATH) instanceof Path p ? p : configDir(APP_NAME).resolve("data.json")).toFile();
|
||||
var keyDir = storageFile.getParentFile().toPath().resolve("keys");
|
||||
var passwordHasher = new UuidHasher();
|
||||
var firstHash = passwordHasher.hash(FIRST_USER_PASS, FIRST_UUID);
|
||||
|
||||
@@ -54,10 +54,10 @@ function handleUsers(response){
|
||||
<td>${u.email}</td>
|
||||
<td>${id}</td>
|
||||
<td style="display: none" class="permissions">
|
||||
<button onclick="editPermission('${id}','MANAGE_CLIENTS',${manage.clients})">${manage.clients ?'-':'+'} Manage Clients</button>
|
||||
<button onclick="editPermission('${id}','MANAGE_PERMISSIONS',${manage.perms})">${manage.perms ?'-':'+'} Manage Permissions</button>
|
||||
<button onclick="editPermission('${id}','MANAGE_SMTP',${manage.smtp})">${manage.smtp ?'-':'+'} Manage SMTP</button>
|
||||
<button onclick="editPermission('${id}','MANAGE_USERS',${manage.users})">${manage.users ?'-':'+'} Manage Users</button>
|
||||
<button onclick="editPermission('${id}','MANAGE_CLIENTS',${manage.clients})">${manage.clients ?'-':'+'} <span>Manage</span> Clients</button>
|
||||
<button onclick="editPermission('${id}','MANAGE_PERMISSIONS',${manage.perms})">${manage.perms ?'-':'+'} <span>Manage</span> Permissions</button>
|
||||
<button onclick="editPermission('${id}','MANAGE_SMTP',${manage.smtp})">${manage.smtp ?'-':'+'} <span>Manage</span> SMTP</button>
|
||||
<button onclick="editPermission('${id}','MANAGE_USERS',${manage.users})">${manage.users ?'-':'+'} <span>Manage</span> Users</button>
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" onclick="reset_password('${id}')" id="reset-${id}">Reset password</button>
|
||||
|
||||
@@ -158,4 +158,16 @@ ul{
|
||||
transform: skewY(20deg);
|
||||
transform-origin: 100% 100%;
|
||||
}
|
||||
}
|
||||
.permissions button{
|
||||
background: orange;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.permissions button span{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.permissions button:hover span{
|
||||
display: initial;
|
||||
}
|
||||
@@ -35,6 +35,8 @@
|
||||
</td>
|
||||
<td>
|
||||
<input value="" type="password" id="pw" placeholder="password" autocomplete="new-password" />
|
||||
</td>
|
||||
<td>
|
||||
<input value="" type="password" id="pw2" placeholder="repeat password" autocomplete="repeat-password" />
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user