web: fix build (#5327)
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
parent
34e9af57fe
commit
948b83a2b2
|
@ -60,7 +60,7 @@ export class ApplicationForm extends ModelForm<Application, string> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const c = await config();
|
const c = await config();
|
||||||
if (c.capabilities.includes(CapabilitiesEnum.SaveMedia)) {
|
if (c.capabilities.includes(CapabilitiesEnum.CanSaveMedia)) {
|
||||||
const icon = this.getFormFiles()["metaIcon"];
|
const icon = this.getFormFiles()["metaIcon"];
|
||||||
if (icon || this.clearIcon) {
|
if (icon || this.clearIcon) {
|
||||||
await new CoreApi(DEFAULT_CONFIG).coreApplicationsSetIconCreate({
|
await new CoreApi(DEFAULT_CONFIG).coreApplicationsSetIconCreate({
|
||||||
|
@ -195,7 +195,7 @@ export class ApplicationForm extends ModelForm<Application, string> {
|
||||||
${t`If checked, the launch URL will open in a new browser tab or window from the user's application library.`}
|
${t`If checked, the launch URL will open in a new browser tab or window from the user's application library.`}
|
||||||
</p>
|
</p>
|
||||||
</ak-form-element-horizontal>
|
</ak-form-element-horizontal>
|
||||||
${rootInterface()?.config?.capabilities.includes(CapabilitiesEnum.SaveMedia)
|
${rootInterface()?.config?.capabilities.includes(CapabilitiesEnum.CanSaveMedia)
|
||||||
? html`<ak-form-element-horizontal label=${t`Icon`} name="metaIcon">
|
? html`<ak-form-element-horizontal label=${t`Icon`} name="metaIcon">
|
||||||
<input type="file" value="" class="pf-c-form-control" />
|
<input type="file" value="" class="pf-c-form-control" />
|
||||||
${this.instance?.metaIcon
|
${this.instance?.metaIcon
|
||||||
|
|
|
@ -56,7 +56,7 @@ export class FlowForm extends ModelForm<Flow, string> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const c = await config();
|
const c = await config();
|
||||||
if (c.capabilities.includes(CapabilitiesEnum.SaveMedia)) {
|
if (c.capabilities.includes(CapabilitiesEnum.CanSaveMedia)) {
|
||||||
const icon = this.getFormFiles()["background"];
|
const icon = this.getFormFiles()["background"];
|
||||||
if (icon || this.clearBackground) {
|
if (icon || this.clearBackground) {
|
||||||
await new FlowsApi(DEFAULT_CONFIG).flowsInstancesSetBackgroundCreate({
|
await new FlowsApi(DEFAULT_CONFIG).flowsInstancesSetBackgroundCreate({
|
||||||
|
@ -315,7 +315,7 @@ export class FlowForm extends ModelForm<Flow, string> {
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
</ak-form-element-horizontal>
|
</ak-form-element-horizontal>
|
||||||
${rootInterface()?.config?.capabilities.includes(CapabilitiesEnum.SaveMedia)
|
${rootInterface()?.config?.capabilities.includes(CapabilitiesEnum.CanSaveMedia)
|
||||||
? html`<ak-form-element-horizontal label=${t`Background`} name="background">
|
? html`<ak-form-element-horizontal label=${t`Background`} name="background">
|
||||||
<input type="file" value="" class="pf-c-form-control" />
|
<input type="file" value="" class="pf-c-form-control" />
|
||||||
${this.instance?.background
|
${this.instance?.background
|
||||||
|
|
|
@ -87,7 +87,7 @@ export class OAuthSourceForm extends ModelForm<OAuthSource, string> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const c = await config();
|
const c = await config();
|
||||||
if (c.capabilities.includes(CapabilitiesEnum.SaveMedia)) {
|
if (c.capabilities.includes(CapabilitiesEnum.CanSaveMedia)) {
|
||||||
const icon = this.getFormFiles()["icon"];
|
const icon = this.getFormFiles()["icon"];
|
||||||
if (icon || this.clearIcon) {
|
if (icon || this.clearIcon) {
|
||||||
await new SourcesApi(DEFAULT_CONFIG).sourcesAllSetIconCreate({
|
await new SourcesApi(DEFAULT_CONFIG).sourcesAllSetIconCreate({
|
||||||
|
@ -315,7 +315,7 @@ export class OAuthSourceForm extends ModelForm<OAuthSource, string> {
|
||||||
${t`Path template for users created. Use placeholders like \`%(slug)s\` to insert the source slug.`}
|
${t`Path template for users created. Use placeholders like \`%(slug)s\` to insert the source slug.`}
|
||||||
</p>
|
</p>
|
||||||
</ak-form-element-horizontal>
|
</ak-form-element-horizontal>
|
||||||
${rootInterface()?.config?.capabilities.includes(CapabilitiesEnum.SaveMedia)
|
${rootInterface()?.config?.capabilities.includes(CapabilitiesEnum.CanSaveMedia)
|
||||||
? html`<ak-form-element-horizontal label=${t`Icon`} name="icon">
|
? html`<ak-form-element-horizontal label=${t`Icon`} name="icon">
|
||||||
<input type="file" value="" class="pf-c-form-control" />
|
<input type="file" value="" class="pf-c-form-control" />
|
||||||
${this.instance?.icon
|
${this.instance?.icon
|
||||||
|
|
|
@ -77,7 +77,7 @@ export class PlexSourceForm extends ModelForm<PlexSource, string> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const c = await config();
|
const c = await config();
|
||||||
if (c.capabilities.includes(CapabilitiesEnum.SaveMedia)) {
|
if (c.capabilities.includes(CapabilitiesEnum.CanSaveMedia)) {
|
||||||
const icon = this.getFormFiles()["icon"];
|
const icon = this.getFormFiles()["icon"];
|
||||||
if (icon || this.clearIcon) {
|
if (icon || this.clearIcon) {
|
||||||
await new SourcesApi(DEFAULT_CONFIG).sourcesAllSetIconCreate({
|
await new SourcesApi(DEFAULT_CONFIG).sourcesAllSetIconCreate({
|
||||||
|
@ -267,7 +267,7 @@ export class PlexSourceForm extends ModelForm<PlexSource, string> {
|
||||||
${t`Path template for users created. Use placeholders like \`%(slug)s\` to insert the source slug.`}
|
${t`Path template for users created. Use placeholders like \`%(slug)s\` to insert the source slug.`}
|
||||||
</p>
|
</p>
|
||||||
</ak-form-element-horizontal>
|
</ak-form-element-horizontal>
|
||||||
${rootInterface()?.config?.capabilities.includes(CapabilitiesEnum.SaveMedia)
|
${rootInterface()?.config?.capabilities.includes(CapabilitiesEnum.CanSaveMedia)
|
||||||
? html`<ak-form-element-horizontal label=${t`Icon`} name="icon">
|
? html`<ak-form-element-horizontal label=${t`Icon`} name="icon">
|
||||||
<input type="file" value="" class="pf-c-form-control" />
|
<input type="file" value="" class="pf-c-form-control" />
|
||||||
${this.instance?.icon
|
${this.instance?.icon
|
||||||
|
|
|
@ -65,7 +65,7 @@ export class SAMLSourceForm extends ModelForm<SAMLSource, string> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const c = await config();
|
const c = await config();
|
||||||
if (c.capabilities.includes(CapabilitiesEnum.SaveMedia)) {
|
if (c.capabilities.includes(CapabilitiesEnum.CanSaveMedia)) {
|
||||||
const icon = this.getFormFiles()["icon"];
|
const icon = this.getFormFiles()["icon"];
|
||||||
if (icon || this.clearIcon) {
|
if (icon || this.clearIcon) {
|
||||||
await new SourcesApi(DEFAULT_CONFIG).sourcesAllSetIconCreate({
|
await new SourcesApi(DEFAULT_CONFIG).sourcesAllSetIconCreate({
|
||||||
|
@ -161,7 +161,7 @@ export class SAMLSourceForm extends ModelForm<SAMLSource, string> {
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
</ak-form-element-horizontal>
|
</ak-form-element-horizontal>
|
||||||
${rootInterface()?.config?.capabilities.includes(CapabilitiesEnum.SaveMedia)
|
${rootInterface()?.config?.capabilities.includes(CapabilitiesEnum.CanSaveMedia)
|
||||||
? html`<ak-form-element-horizontal label=${t`Icon`} name="icon">
|
? html`<ak-form-element-horizontal label=${t`Icon`} name="icon">
|
||||||
<input type="file" value="" class="pf-c-form-control" />
|
<input type="file" value="" class="pf-c-form-control" />
|
||||||
${this.instance?.icon
|
${this.instance?.icon
|
||||||
|
|
|
@ -191,7 +191,7 @@ export class RelatedUserList extends Table<User> {
|
||||||
<i class="fas fa-edit"></i>
|
<i class="fas fa-edit"></i>
|
||||||
</button>
|
</button>
|
||||||
</ak-forms-modal>
|
</ak-forms-modal>
|
||||||
${rootInterface()?.config?.capabilities.includes(CapabilitiesEnum.Impersonate)
|
${rootInterface()?.config?.capabilities.includes(CapabilitiesEnum.CanImpersonate)
|
||||||
? html`
|
? html`
|
||||||
<a
|
<a
|
||||||
class="pf-c-button pf-m-tertiary"
|
class="pf-c-button pf-m-tertiary"
|
||||||
|
|
|
@ -149,7 +149,7 @@ export class UserListPage extends TablePage<User> {
|
||||||
<i class="fas fa-edit"></i>
|
<i class="fas fa-edit"></i>
|
||||||
</button>
|
</button>
|
||||||
</ak-forms-modal>
|
</ak-forms-modal>
|
||||||
${rootInterface()?.config?.capabilities.includes(CapabilitiesEnum.Impersonate)
|
${rootInterface()?.config?.capabilities.includes(CapabilitiesEnum.CanImpersonate)
|
||||||
? html`
|
? html`
|
||||||
<a
|
<a
|
||||||
class="pf-c-button pf-m-tertiary"
|
class="pf-c-button pf-m-tertiary"
|
||||||
|
|
|
@ -197,7 +197,7 @@ export class UserViewPage extends AKElement {
|
||||||
</ak-forms-modal>
|
</ak-forms-modal>
|
||||||
</div>
|
</div>
|
||||||
${rootInterface()?.config?.capabilities.includes(
|
${rootInterface()?.config?.capabilities.includes(
|
||||||
CapabilitiesEnum.Impersonate,
|
CapabilitiesEnum.CanImpersonate,
|
||||||
)
|
)
|
||||||
? html`
|
? html`
|
||||||
<div class="pf-c-card__footer">
|
<div class="pf-c-card__footer">
|
||||||
|
|
|
@ -193,7 +193,7 @@ export class PromptStage extends BaseStage<PromptChallenge, PromptChallengeRespo
|
||||||
// Only show debug locale if debug mode is enabled
|
// Only show debug locale if debug mode is enabled
|
||||||
if (locale.code === "debug") {
|
if (locale.code === "debug") {
|
||||||
return rootInterface()?.config?.capabilities.includes(
|
return rootInterface()?.config?.capabilities.includes(
|
||||||
CapabilitiesEnum.Debug,
|
CapabilitiesEnum.CanDebug,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Reference in New Issue