hide license info in about from non staff users
This commit is contained in:
@@ -77,45 +77,50 @@
|
|||||||
<span class="ml-6 body-1">{{ t("TimeZone") }}: </span>
|
<span class="ml-6 body-1">{{ t("TimeZone") }}: </span>
|
||||||
<span class="body-2">{{ serverInfo.serverTimeZone }}</span>
|
<span class="body-2">{{ serverInfo.serverTimeZone }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="canViewLicenseInfo()">
|
||||||
|
<v-divider class="mt-6"></v-divider>
|
||||||
|
<v-subheader>{{ t("HelpLicense") }}</v-subheader>
|
||||||
|
<div>
|
||||||
|
<span class="ml-6 body-1">{{ t("RegisteredUser") }}: </span>
|
||||||
|
<span class="body-2">{{
|
||||||
|
serverInfo.license.license.licensedTo
|
||||||
|
}}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span class="ml-6 body-1">{{ t("DatabaseID") }}: </span>
|
||||||
|
<span class="body-2">{{ serverInfo.license.license.dbId }}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span class="ml-6 body-1">{{ t("LicenseSerial") }}: </span>
|
||||||
|
<span class="body-2">{{
|
||||||
|
serverInfo.license.license.keySerial
|
||||||
|
}}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span class="ml-6 body-1">{{ t("LicenseExpiration") }}: </span>
|
||||||
|
<span class="body-2">{{
|
||||||
|
serverInfo.license.license.licenseExpiration
|
||||||
|
}}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span class="ml-6 body-1">{{ t("SupportedUntil") }}: </span>
|
||||||
|
<span class="body-2">{{
|
||||||
|
serverInfo.license.license.maintenanceExpiration
|
||||||
|
}}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<v-divider class="mt-6"></v-divider>
|
<v-divider class="mt-6"></v-divider>
|
||||||
<v-subheader>{{ t("HelpLicense") }}</v-subheader>
|
<v-subheader>{{ t("LicensedOptions") }}</v-subheader>
|
||||||
<div>
|
|
||||||
<span class="ml-6 body-1">{{ t("RegisteredUser") }}: </span>
|
|
||||||
<span class="body-2">{{
|
|
||||||
serverInfo.license.license.licensedTo
|
|
||||||
}}</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span class="ml-6 body-1">{{ t("DatabaseID") }}: </span>
|
|
||||||
<span class="body-2">{{ serverInfo.license.license.dbId }}</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span class="ml-6 body-1">{{ t("LicenseSerial") }}: </span>
|
|
||||||
<span class="body-2">{{ serverInfo.license.license.keySerial }}</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span class="ml-6 body-1">{{ t("LicenseExpiration") }}: </span>
|
|
||||||
<span class="body-2">{{
|
|
||||||
serverInfo.license.license.licenseExpiration
|
|
||||||
}}</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span class="ml-6 body-1">{{ t("SupportedUntil") }}: </span>
|
|
||||||
<span class="body-2">{{
|
|
||||||
serverInfo.license.license.maintenanceExpiration
|
|
||||||
}}</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<v-divider class="mt-6"></v-divider>
|
<div
|
||||||
<v-subheader>{{ t("LicensedOptions") }}</v-subheader>
|
v-for="item in serverInfo.license.license.features"
|
||||||
|
:key="item.Feature"
|
||||||
<div
|
>
|
||||||
v-for="item in serverInfo.license.license.features"
|
<span class="ml-6 body-1">{{ item.Feature }}</span>
|
||||||
:key="item.Feature"
|
<span class="body-2">{{
|
||||||
>
|
item.Count ? ": " + item.Count : ""
|
||||||
<span class="ml-6 body-1">{{ item.Feature }}</span>
|
}}</span>
|
||||||
<span class="body-2">{{ item.Count ? ": " + item.Count : "" }}</span>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<v-divider class="mt-6"></v-divider>
|
<v-divider class="mt-6"></v-divider>
|
||||||
@@ -174,6 +179,21 @@ export default {
|
|||||||
},
|
},
|
||||||
locale() {
|
locale() {
|
||||||
return window.$gz.locale;
|
return window.$gz.locale;
|
||||||
|
},
|
||||||
|
canViewLicenseInfo() {
|
||||||
|
/*
|
||||||
|
Administrator = 1,
|
||||||
|
Schedulable = 2,
|
||||||
|
NonSchedulable = 3,
|
||||||
|
Customer = 4,
|
||||||
|
HeadOffice = 5,
|
||||||
|
Utility = 6,
|
||||||
|
Subcontractor = 7 */
|
||||||
|
return (
|
||||||
|
window.$gz.store.state.userType == 1 ||
|
||||||
|
window.$gz.store.state.userType == 2 ||
|
||||||
|
window.$gz.store.state.userType == 3
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -94,6 +94,36 @@ describe("Login", () => {
|
|||||||
cy.get("[data-cy='app:logout']").click();
|
cy.get("[data-cy='app:logout']").click();
|
||||||
cy.url().should("include", "/login");
|
cy.url().should("include", "/login");
|
||||||
|
|
||||||
//-------------------------
|
//-----------------------------------------------------
|
||||||
|
//ENGLISH - CustomerLimited
|
||||||
|
cy.get("input[name=username]")
|
||||||
|
.clear()
|
||||||
|
.type("CustomerLimited");
|
||||||
|
|
||||||
|
// {enter} causes the form to submit
|
||||||
|
cy.get("input[name=password]")
|
||||||
|
.clear()
|
||||||
|
.type("CustomerLimited{enter}");
|
||||||
|
|
||||||
|
// we should be redirected to /customer-csr-list
|
||||||
|
cy.url().should("include", "/customer-csr-list");
|
||||||
|
|
||||||
|
//nav to about form
|
||||||
|
cy.get("[data-cy=contextmenu]").click();
|
||||||
|
cy.get('[data-cy="app:nav:abt"]').click();
|
||||||
|
|
||||||
|
//ensure there is translated text on the form
|
||||||
|
//title
|
||||||
|
cy.contains("About AyaNova");
|
||||||
|
//client user should *NOT* see the licensed to bit or licensed options
|
||||||
|
cy.contains("Licensed to").should("not.exist");
|
||||||
|
|
||||||
|
|
||||||
|
//LOGOUT
|
||||||
|
cy.get("[data-cy=contextmenu]").click();
|
||||||
|
cy.get("[data-cy='app:logout']").click();
|
||||||
|
cy.url().should("include", "/login");
|
||||||
|
|
||||||
|
//-----------------------------------------------------
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user