Restrict superuser, eval mode offer bizadmin once it exists so evaluators can see all the things now restricted to superuser

This commit is contained in:
2022-08-24 18:44:25 +00:00
parent 089ba29fbb
commit 27ea21bc77
4 changed files with 65 additions and 50 deletions

View File

@@ -129,7 +129,7 @@
@click:append-outer="reveal = !reveal"
></v-text-field>
</v-col>
<v-col cols="12" sm="6" lg="4" xl="3">
<gz-date-time-picker
ref="lastLogin"

View File

@@ -373,12 +373,19 @@ export default {
try {
let res = await window.$gz.api.get("notify/hello");
if (res.data != null) {
if (res.data.sudf == true) {
//if the superuser exists with default credentials then use it to get them going unless the trial eval users exist in which case use bizadmin as the default
//as it has more rights to view things
if (res.data.eval == true) {
vm.input.username = "BizAdmin";
vm.input.password = "BizAdmin";
vm.reveal = true; //might as well show it since it's the default anyway
} else if (res.data.sudf == true) {
//superuser is default creds
vm.input.username = "superuser";
vm.input.password = "l3tm3in";
vm.reveal = true; //might as well show it since it's the default anyway
}
//However, if the eval users exist then
vm.showEvalUsers = res.data.eval;
vm.hasSmallLogo = res.data.sl;
vm.hasMediumLogo = res.data.ml;