Skip to content

Commit

Permalink
allow footer links that are not links
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
  • Loading branch information
BeryJu committed Jun 30, 2024
1 parent d927aae commit bf0f715
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion authentik/brands/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
class FooterLinkSerializer(PassiveSerializer):
"""Links returned in Config API"""

href = CharField(read_only=True)
href = CharField(read_only=True, allow_null=True)

Check warning on line 27 in authentik/brands/api.py

View check run for this annotation

Codecov / codecov/patch

authentik/brands/api.py#L27

Added line #L27 was not covered by tests
name = CharField(read_only=True)


Expand Down
1 change: 1 addition & 0 deletions schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36634,6 +36634,7 @@ components:
href:
type: string
readOnly: true
nullable: true
name:
type: string
readOnly: true
Expand Down
9 changes: 6 additions & 3 deletions web/src/flow/FlowExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -503,10 +503,13 @@ export class FlowExecutor extends Interface implements StageHost {
<footer class="pf-c-login__footer">
<ul class="pf-c-list pf-m-inline">
${this.brand?.uiFooterLinks?.map((link) => {
if (link.href) {
return html`<li>
<a href="${link.href}">${link.name}</a>
</li>`;
}
return html`<li>
<a href="${link.href || ""}"
>${link.name}</a
>
<span>${link.name}</span>
</li>`;
})}
<li>
Expand Down
2 changes: 2 additions & 0 deletions website/docs/core/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ The setting can be used as follows:
[{ "name": "Link Name", "href": "https://goauthentik.io" }]
```

Starting with authentik 2024.6.1, the `href` attribute is optional, and this option can be used to add additional text to the flow executor pages.

### GDPR compliance

When enabled, all the events caused by a user will be deleted upon the user's deletion. Defaults to `true`.
Expand Down

0 comments on commit bf0f715

Please sign in to comment.