web/admin: add custom rendering for inbuilt sources
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
5dd29d45d8
commit
34b8a97ae9
|
@ -6,13 +6,19 @@ from django.db import migrations, models
|
|||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('authentik_core', '0018_auto_20210330_1345'),
|
||||
("authentik_core", "0018_auto_20210330_1345"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='source',
|
||||
name='managed',
|
||||
field=models.TextField(default=None, help_text='Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update.', null=True, unique=True, verbose_name='Managed by authentik'),
|
||||
model_name="source",
|
||||
name="managed",
|
||||
field=models.TextField(
|
||||
default=None,
|
||||
help_text="Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update.",
|
||||
null=True,
|
||||
unique=True,
|
||||
verbose_name="Managed by authentik",
|
||||
),
|
||||
),
|
||||
]
|
||||
|
|
|
@ -73,8 +73,8 @@ class Migration(migrations.Migration):
|
|||
("authentik.stages.user_login", "authentik Stages.User Login"),
|
||||
("authentik.stages.user_logout", "authentik Stages.User Logout"),
|
||||
("authentik.stages.user_write", "authentik Stages.User Write"),
|
||||
("authentik.managed", "authentik Managed"),
|
||||
("authentik.core", "authentik Core"),
|
||||
("authentik.managed", "authentik Managed"),
|
||||
],
|
||||
default="",
|
||||
help_text="Match events created by selected application. When left empty, all applications are matched.",
|
||||
|
|
12
swagger.yaml
12
swagger.yaml
|
@ -16039,8 +16039,8 @@ definitions:
|
|||
- authentik.stages.user_login
|
||||
- authentik.stages.user_logout
|
||||
- authentik.stages.user_write
|
||||
- authentik.managed
|
||||
- authentik.core
|
||||
- authentik.managed
|
||||
ExpressionPolicy:
|
||||
required:
|
||||
- expression
|
||||
|
@ -17950,6 +17950,16 @@ definitions:
|
|||
enum:
|
||||
- all
|
||||
- any
|
||||
managed:
|
||||
title: Managed by authentik
|
||||
description: Objects which are managed by authentik. These objects
|
||||
are created and updated automatically. This is flag only indicates
|
||||
that an object can be overwritten by migrations. You can still
|
||||
modify the objects via the API, but expect changes to be overwritten
|
||||
in a later update.
|
||||
type: string
|
||||
minLength: 1
|
||||
x-nullable: true
|
||||
name:
|
||||
title: Name
|
||||
description: Source's display Name.
|
||||
|
|
|
@ -230,10 +230,6 @@ export abstract class Table<T> extends LitElement {
|
|||
return html``;
|
||||
}
|
||||
|
||||
renderRowsAbove(): TemplateResult {
|
||||
return html``;
|
||||
}
|
||||
|
||||
firstUpdated(): void {
|
||||
this.fetch();
|
||||
}
|
||||
|
@ -269,7 +265,6 @@ export abstract class Table<T> extends LitElement {
|
|||
${this.columns().map((col) => col.render(this))}
|
||||
</tr>
|
||||
</thead>
|
||||
${this.renderRowsAbove()}
|
||||
${(this.isLoading || !this.data) ? this.renderLoading() : this.renderRows()}
|
||||
</table>
|
||||
<div class="pf-c-pagination pf-m-bottom">
|
||||
|
|
|
@ -370,7 +370,8 @@ msgstr "Binding Type"
|
|||
msgid "Build hash: {0}"
|
||||
msgstr "Build hash: {0}"
|
||||
|
||||
#: src/pages/sources/SourcesListPage.ts:62
|
||||
#: src/pages/sources/SourcesListPage.ts:103
|
||||
#: src/pages/sources/SourcesListPage.ts:105
|
||||
msgid "Built-in"
|
||||
msgstr "Built-in"
|
||||
|
||||
|
@ -688,8 +689,8 @@ msgstr "Copy Key"
|
|||
#: src/pages/providers/ProviderListPage.ts:116
|
||||
#: src/pages/providers/RelatedApplicationButton.ts:27
|
||||
#: src/pages/providers/RelatedApplicationButton.ts:35
|
||||
#: src/pages/sources/SourcesListPage.ts:115
|
||||
#: src/pages/sources/SourcesListPage.ts:124
|
||||
#: src/pages/sources/SourcesListPage.ts:113
|
||||
#: src/pages/sources/SourcesListPage.ts:122
|
||||
#: src/pages/stages/StageListPage.ts:119
|
||||
#: src/pages/stages/StageListPage.ts:128
|
||||
#: src/pages/stages/invitation/InvitationListPage.ts:77
|
||||
|
@ -786,7 +787,7 @@ msgstr "Create provider"
|
|||
#: src/pages/policies/PolicyListPage.ts:136
|
||||
#: src/pages/property-mappings/PropertyMappingListPage.ts:125
|
||||
#: src/pages/providers/ProviderListPage.ts:119
|
||||
#: src/pages/sources/SourcesListPage.ts:127
|
||||
#: src/pages/sources/SourcesListPage.ts:125
|
||||
#: src/pages/stages/StageListPage.ts:131
|
||||
msgid "Create {0}"
|
||||
msgstr "Create {0}"
|
||||
|
@ -841,7 +842,7 @@ msgstr "Define how notifications are sent to users, like Email or Webhook."
|
|||
#: src/pages/policies/PolicyListPage.ts:115
|
||||
#: src/pages/property-mappings/PropertyMappingListPage.ts:104
|
||||
#: src/pages/providers/ProviderListPage.ts:98
|
||||
#: src/pages/sources/SourcesListPage.ts:106
|
||||
#: src/pages/sources/SourcesListPage.ts:94
|
||||
#: src/pages/stages/StageListPage.ts:110
|
||||
#: src/pages/stages/invitation/InvitationListPage.ts:68
|
||||
#: src/pages/stages/prompt/PromptListPage.ts:87
|
||||
|
@ -943,7 +944,7 @@ msgstr "Disable Static Tokens"
|
|||
msgid "Disable Time-based OTP"
|
||||
msgstr "Disable Time-based OTP"
|
||||
|
||||
#: src/pages/sources/SourcesListPage.ts:75
|
||||
#: src/pages/sources/SourcesListPage.ts:63
|
||||
msgid "Disabled"
|
||||
msgstr "Disabled"
|
||||
|
||||
|
@ -980,7 +981,7 @@ msgstr "Each provider has a different issuer, based on the application slug."
|
|||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts:139
|
||||
#: src/pages/providers/proxy/ProxyProviderViewPage.ts:138
|
||||
#: src/pages/providers/saml/SAMLProviderViewPage.ts:132
|
||||
#: src/pages/sources/SourcesListPage.ts:94
|
||||
#: src/pages/sources/SourcesListPage.ts:82
|
||||
#: src/pages/sources/ldap/LDAPSourceViewPage.ts:116
|
||||
#: src/pages/sources/oauth/OAuthSourceViewPage.ts:135
|
||||
#: src/pages/sources/saml/SAMLSourceViewPage.ts:122
|
||||
|
@ -1208,10 +1209,6 @@ msgstr "External Applications which use authentik as Identity-Provider, utilizin
|
|||
msgid "External Host"
|
||||
msgstr "External Host"
|
||||
|
||||
#: src/pages/sources/SourcesListPage.ts:33
|
||||
msgid "External Sources which can be used to get Identities into authentik, for example Social Providers like Twiter and GitHub or Enterprise Providers like ADFS and LDAP."
|
||||
msgstr "External Sources which can be used to get Identities into authentik, for example Social Providers like Twiter and GitHub or Enterprise Providers like ADFS and LDAP."
|
||||
|
||||
#: src/pages/providers/proxy/ProxyProviderForm.ts:118
|
||||
msgid "External host"
|
||||
msgstr "External host"
|
||||
|
@ -2601,7 +2598,7 @@ msgstr "See documentation for a list of all variables."
|
|||
msgid "Select a provider that this application should use. Alternatively, create a new provider."
|
||||
msgstr "Select a provider that this application should use. Alternatively, create a new provider."
|
||||
|
||||
#: src/elements/table/Table.ts:218
|
||||
#: src/elements/table/Table.ts:215
|
||||
msgid "Select all rows"
|
||||
msgstr "Select all rows"
|
||||
|
||||
|
@ -2746,7 +2743,7 @@ msgid "Something went wrong! Please try again later."
|
|||
msgstr "Something went wrong! Please try again later."
|
||||
|
||||
#: src/pages/providers/ProviderListPage.ts:91
|
||||
#: src/pages/sources/SourcesListPage.ts:99
|
||||
#: src/pages/sources/SourcesListPage.ts:87
|
||||
msgid "Source"
|
||||
msgstr "Source"
|
||||
|
||||
|
@ -2759,6 +2756,10 @@ msgstr "Source {0}"
|
|||
msgid "Sources"
|
||||
msgstr "Sources"
|
||||
|
||||
#: src/pages/sources/SourcesListPage.ts:33
|
||||
msgid "Sources of identities, which can either be synced into authentik's database, like LDAP, or can be used by users to authenticate and enroll themselves, like OAuth and social logins"
|
||||
msgstr "Sources of identities, which can either be synced into authentik's database, like LDAP, or can be used by users to authenticate and enroll themselves, like OAuth and social logins"
|
||||
|
||||
#: src/pages/flows/StageBindingForm.ts:98
|
||||
msgid "Stage"
|
||||
msgstr "Stage"
|
||||
|
@ -3379,7 +3380,7 @@ msgstr "Up-to-date!"
|
|||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts:129
|
||||
#: src/pages/providers/proxy/ProxyProviderViewPage.ts:128
|
||||
#: src/pages/providers/saml/SAMLProviderViewPage.ts:122
|
||||
#: src/pages/sources/SourcesListPage.ts:81
|
||||
#: src/pages/sources/SourcesListPage.ts:69
|
||||
#: src/pages/sources/ldap/LDAPSourceViewPage.ts:106
|
||||
#: src/pages/sources/oauth/OAuthSourceViewPage.ts:125
|
||||
#: src/pages/sources/saml/SAMLSourceViewPage.ts:112
|
||||
|
@ -3482,7 +3483,7 @@ msgstr "Update details"
|
|||
#: src/pages/policies/PolicyListPage.ts:80
|
||||
#: src/pages/property-mappings/PropertyMappingListPage.ts:69
|
||||
#: src/pages/providers/ProviderListPage.ts:76
|
||||
#: src/pages/sources/SourcesListPage.ts:84
|
||||
#: src/pages/sources/SourcesListPage.ts:72
|
||||
#: src/pages/stages/StageListPage.ts:88
|
||||
#: src/pages/users/UserActiveForm.ts:41
|
||||
msgid "Update {0}"
|
||||
|
@ -3746,10 +3747,6 @@ msgstr "Yes"
|
|||
msgid "You're currently impersonating {0}."
|
||||
msgstr "You're currently impersonating {0}."
|
||||
|
||||
#: src/pages/sources/SourcesListPage.ts:61
|
||||
msgid "authentik Built-in"
|
||||
msgstr "authentik Built-in"
|
||||
|
||||
#: src/pages/stages/password/PasswordStageForm.ts:76
|
||||
msgid "authentik Builtin Database"
|
||||
msgstr "authentik Builtin Database"
|
||||
|
|
|
@ -366,7 +366,8 @@ msgstr ""
|
|||
msgid "Build hash: {0}"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/sources/SourcesListPage.ts:62
|
||||
#: src/pages/sources/SourcesListPage.ts:103
|
||||
#: src/pages/sources/SourcesListPage.ts:105
|
||||
msgid "Built-in"
|
||||
msgstr ""
|
||||
|
||||
|
@ -684,8 +685,8 @@ msgstr ""
|
|||
#: src/pages/providers/ProviderListPage.ts:116
|
||||
#: src/pages/providers/RelatedApplicationButton.ts:27
|
||||
#: src/pages/providers/RelatedApplicationButton.ts:35
|
||||
#: src/pages/sources/SourcesListPage.ts:115
|
||||
#: src/pages/sources/SourcesListPage.ts:124
|
||||
#: src/pages/sources/SourcesListPage.ts:113
|
||||
#: src/pages/sources/SourcesListPage.ts:122
|
||||
#: src/pages/stages/StageListPage.ts:119
|
||||
#: src/pages/stages/StageListPage.ts:128
|
||||
#: src/pages/stages/invitation/InvitationListPage.ts:77
|
||||
|
@ -782,7 +783,7 @@ msgstr ""
|
|||
#: src/pages/policies/PolicyListPage.ts:136
|
||||
#: src/pages/property-mappings/PropertyMappingListPage.ts:125
|
||||
#: src/pages/providers/ProviderListPage.ts:119
|
||||
#: src/pages/sources/SourcesListPage.ts:127
|
||||
#: src/pages/sources/SourcesListPage.ts:125
|
||||
#: src/pages/stages/StageListPage.ts:131
|
||||
msgid "Create {0}"
|
||||
msgstr ""
|
||||
|
@ -837,7 +838,7 @@ msgstr ""
|
|||
#: src/pages/policies/PolicyListPage.ts:115
|
||||
#: src/pages/property-mappings/PropertyMappingListPage.ts:104
|
||||
#: src/pages/providers/ProviderListPage.ts:98
|
||||
#: src/pages/sources/SourcesListPage.ts:106
|
||||
#: src/pages/sources/SourcesListPage.ts:94
|
||||
#: src/pages/stages/StageListPage.ts:110
|
||||
#: src/pages/stages/invitation/InvitationListPage.ts:68
|
||||
#: src/pages/stages/prompt/PromptListPage.ts:87
|
||||
|
@ -939,7 +940,7 @@ msgstr ""
|
|||
msgid "Disable Time-based OTP"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/sources/SourcesListPage.ts:75
|
||||
#: src/pages/sources/SourcesListPage.ts:63
|
||||
msgid "Disabled"
|
||||
msgstr ""
|
||||
|
||||
|
@ -976,7 +977,7 @@ msgstr ""
|
|||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts:139
|
||||
#: src/pages/providers/proxy/ProxyProviderViewPage.ts:138
|
||||
#: src/pages/providers/saml/SAMLProviderViewPage.ts:132
|
||||
#: src/pages/sources/SourcesListPage.ts:94
|
||||
#: src/pages/sources/SourcesListPage.ts:82
|
||||
#: src/pages/sources/ldap/LDAPSourceViewPage.ts:116
|
||||
#: src/pages/sources/oauth/OAuthSourceViewPage.ts:135
|
||||
#: src/pages/sources/saml/SAMLSourceViewPage.ts:122
|
||||
|
@ -1204,10 +1205,6 @@ msgstr ""
|
|||
msgid "External Host"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/sources/SourcesListPage.ts:33
|
||||
msgid "External Sources which can be used to get Identities into authentik, for example Social Providers like Twiter and GitHub or Enterprise Providers like ADFS and LDAP."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/providers/proxy/ProxyProviderForm.ts:118
|
||||
msgid "External host"
|
||||
msgstr ""
|
||||
|
@ -2597,7 +2594,7 @@ msgstr ""
|
|||
msgid "Select a provider that this application should use. Alternatively, create a new provider."
|
||||
msgstr ""
|
||||
|
||||
#: src/elements/table/Table.ts:218
|
||||
#: src/elements/table/Table.ts:215
|
||||
msgid "Select all rows"
|
||||
msgstr ""
|
||||
|
||||
|
@ -2742,7 +2739,7 @@ msgid "Something went wrong! Please try again later."
|
|||
msgstr ""
|
||||
|
||||
#: src/pages/providers/ProviderListPage.ts:91
|
||||
#: src/pages/sources/SourcesListPage.ts:99
|
||||
#: src/pages/sources/SourcesListPage.ts:87
|
||||
msgid "Source"
|
||||
msgstr ""
|
||||
|
||||
|
@ -2755,6 +2752,10 @@ msgstr ""
|
|||
msgid "Sources"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/sources/SourcesListPage.ts:33
|
||||
msgid "Sources of identities, which can either be synced into authentik's database, like LDAP, or can be used by users to authenticate and enroll themselves, like OAuth and social logins"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/flows/StageBindingForm.ts:98
|
||||
msgid "Stage"
|
||||
msgstr ""
|
||||
|
@ -3373,7 +3374,7 @@ msgstr ""
|
|||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts:129
|
||||
#: src/pages/providers/proxy/ProxyProviderViewPage.ts:128
|
||||
#: src/pages/providers/saml/SAMLProviderViewPage.ts:122
|
||||
#: src/pages/sources/SourcesListPage.ts:81
|
||||
#: src/pages/sources/SourcesListPage.ts:69
|
||||
#: src/pages/sources/ldap/LDAPSourceViewPage.ts:106
|
||||
#: src/pages/sources/oauth/OAuthSourceViewPage.ts:125
|
||||
#: src/pages/sources/saml/SAMLSourceViewPage.ts:112
|
||||
|
@ -3476,7 +3477,7 @@ msgstr ""
|
|||
#: src/pages/policies/PolicyListPage.ts:80
|
||||
#: src/pages/property-mappings/PropertyMappingListPage.ts:69
|
||||
#: src/pages/providers/ProviderListPage.ts:76
|
||||
#: src/pages/sources/SourcesListPage.ts:84
|
||||
#: src/pages/sources/SourcesListPage.ts:72
|
||||
#: src/pages/stages/StageListPage.ts:88
|
||||
#: src/pages/users/UserActiveForm.ts:41
|
||||
msgid "Update {0}"
|
||||
|
@ -3740,10 +3741,6 @@ msgstr ""
|
|||
msgid "You're currently impersonating {0}."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/sources/SourcesListPage.ts:61
|
||||
msgid "authentik Built-in"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/stages/password/PasswordStageForm.ts:76
|
||||
msgid "authentik Builtin Database"
|
||||
msgstr ""
|
||||
|
|
|
@ -24,7 +24,7 @@ export class SourceListPage extends TablePage<Source> {
|
|||
return t`Sources`;
|
||||
}
|
||||
pageDescription(): string | undefined {
|
||||
return t`External Sources which can be used to get Identities into authentik, for example Social Providers like Twiter and GitHub or Enterprise Providers like ADFS and LDAP.`;
|
||||
return t`Sources of identities, which can either be synced into authentik's database, like LDAP, or can be used by users to authenticate and enroll themselves, like OAuth and social logins`;
|
||||
}
|
||||
pageIcon(): string {
|
||||
return "pf-icon pf-icon-middleware";
|
||||
|
@ -53,23 +53,10 @@ export class SourceListPage extends TablePage<Source> {
|
|||
];
|
||||
}
|
||||
|
||||
renderRowsAbove(): TemplateResult {
|
||||
return html`<tbody role="rowgroup">
|
||||
<tr role="row">
|
||||
<td role="cell">
|
||||
<span>
|
||||
<div>${t`authentik Built-in`}</div>
|
||||
<small>${t`Built-in`}</small>
|
||||
</span>
|
||||
</td>
|
||||
<td role="cell">-</td>
|
||||
<td role="cell">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>`;
|
||||
}
|
||||
|
||||
row(item: Source): TemplateResult[] {
|
||||
if (item.component === "") {
|
||||
return this.rowInbuilt(item);
|
||||
}
|
||||
return [
|
||||
html`<a href="#/core/sources/${item.slug}">
|
||||
<div>${item.name}</div>
|
||||
|
@ -110,6 +97,17 @@ export class SourceListPage extends TablePage<Source> {
|
|||
];
|
||||
}
|
||||
|
||||
rowInbuilt(item: Source): TemplateResult[] {
|
||||
return [
|
||||
html`<span>
|
||||
<div>${item.name}</div>
|
||||
<small>${t`Built-in`}</small>
|
||||
</span>`,
|
||||
html`${t`Built-in`}`,
|
||||
html``,
|
||||
];
|
||||
}
|
||||
|
||||
renderToolbar(): TemplateResult {
|
||||
return html`
|
||||
<ak-dropdown class="pf-c-dropdown">
|
||||
|
|
Reference in New Issue