core: fix tokens not being viewable but superusers

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-09-19 16:08:30 +02:00
parent 3f42067a8f
commit f6e0f0282d
20 changed files with 97 additions and 29 deletions

View File

@ -109,7 +109,7 @@ export class ApplicationListPage extends TablePage<Application> {
${item.providerObj?.name}
</a>`
: html`-`,
html`${item.providerObj?.verboseName || "-"}`,
html`${item.providerObj?.verboseName || t`-`}`,
html` <ak-forms-modal>
<span slot="submit"> ${t`Update`} </span>
<span slot="header"> ${t`Update Application`} </span>

View File

@ -63,8 +63,8 @@ export class EventListPage extends TablePage<Event> {
: html``}`
: html`-`,
html`<span>${item.created?.toLocaleString()}</span>`,
html`<span>${item.clientIp || "-"}</span>`,
html`<span>${item.tenant?.name || "-"}</span>`,
html`<span>${item.clientIp || t`-`}</span>`,
html`<span>${item.tenant?.name || t`-`}</span>`,
html`<a href="#/events/log/${item.pk}">
<i class="fas fas fa-share-square"></i>
</a>`,

View File

@ -75,7 +75,7 @@ export class GroupListPage extends TablePage<Group> {
row(item: Group): TemplateResult[] {
return [
html`${item.name}`,
html`${item.parent || "-"}`,
html`${item.parent || t`-`}`,
html`${Array.from(item.users || []).length}`,
html`${item.isSuperuser ? t`Yes` : t`No`}`,
html` <ak-forms-modal>

View File

@ -48,7 +48,7 @@ export class MemberSelectTable extends TableModal<User> {
<small>${item.name}</small>
</div>`,
html`${item.isActive ? t`Yes` : t`No`}`,
html`${first(item.lastLogin?.toLocaleString(), "-")}`,
html`${first(item.lastLogin?.toLocaleString(), t`-`)}`,
];
}

View File

@ -211,7 +211,7 @@ export class OAuth2ProviderViewPage extends LitElement {
class="pf-c-form-control"
readonly
type="text"
value="${this.providerUrls?.providerInfo || "-"}"
value="${this.providerUrls?.providerInfo || t`-`}"
/>
</div>
<div class="pf-c-form__group">
@ -227,7 +227,7 @@ export class OAuth2ProviderViewPage extends LitElement {
class="pf-c-form-control"
readonly
type="text"
value="${this.providerUrls?.issuer || "-"}"
value="${this.providerUrls?.issuer || t`-`}"
/>
</div>
<hr />
@ -244,7 +244,7 @@ export class OAuth2ProviderViewPage extends LitElement {
class="pf-c-form-control"
readonly
type="text"
value="${this.providerUrls?.authorize || "-"}"
value="${this.providerUrls?.authorize || t`-`}"
/>
</div>
<div class="pf-c-form__group">
@ -260,7 +260,7 @@ export class OAuth2ProviderViewPage extends LitElement {
class="pf-c-form-control"
readonly
type="text"
value="${this.providerUrls?.token || "-"}"
value="${this.providerUrls?.token || t`-`}"
/>
</div>
<div class="pf-c-form__group">
@ -276,7 +276,7 @@ export class OAuth2ProviderViewPage extends LitElement {
class="pf-c-form-control"
readonly
type="text"
value="${this.providerUrls?.userInfo || "-"}"
value="${this.providerUrls?.userInfo || t`-`}"
/>
</div>
<div class="pf-c-form__group">
@ -292,7 +292,7 @@ export class OAuth2ProviderViewPage extends LitElement {
class="pf-c-form-control"
readonly
type="text"
value="${this.providerUrls?.logout || "-"}"
value="${this.providerUrls?.logout || t`-`}"
/>
</div>
</form>

View File

@ -79,7 +79,7 @@ export class InvitationListPage extends TablePage<Invitation> {
return [
html`${item.pk}`,
html`${item.createdBy?.username}`,
html`${item.expires?.toLocaleString() || "-"}`,
html`${item.expires?.toLocaleString() || t`-`}`,
];
}

View File

@ -105,7 +105,7 @@ export class TokenListPage extends TablePage<Token> {
html`${item.identifier}`,
html`<a href="#/identity/users/${item.userObj?.pk}">${item.userObj?.username}</a>`,
html`${item.expiring ? t`Yes` : t`No`}`,
html`${item.expiring ? item.expires?.toLocaleString() : "-"}`,
html`${item.expiring ? item.expires?.toLocaleString() : t`-`}`,
html`${IntentToLabel(item.intent || IntentEnum.Api)}`,
html`
<ak-forms-modal>

View File

@ -106,7 +106,7 @@ export class UserListPage extends TablePage<User> {
<small>${item.name}</small>
</a>`,
html`${item.isActive ? t`Yes` : t`No`}`,
html`${first(item.lastLogin?.toLocaleString(), "-")}`,
html`${first(item.lastLogin?.toLocaleString(), t`-`)}`,
html` <ak-forms-modal>
<span slot="submit"> ${t`Update`} </span>
<span slot="header"> ${t`Update User`} </span>