Compare commits

...

4 Commits

Author SHA1 Message Date
8ff27f69e1 release: 2024.2.0-rc1 2024-02-15 19:19:40 +01:00
045cd98276 web: fix save & reset behavior on System ➲ Settings page. (cherry-pick #8528) (#8534)
web: fix save & reset behavior on System ➲ Settings page. (#8528)

Co-authored-by: Ken Sternberg <133134217+kensternberg-authentik@users.noreply.github.com>
Co-authored-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
2024-02-15 19:01:47 +01:00
b520843984 ci: fix release pipeline (cherry-pick #8530) (#8533)
Co-authored-by: Jens L <jens@goauthentik.io>
fix release pipeline (#8530)
2024-02-15 17:33:55 +00:00
92216e4ea8 ci: docker push: re-add timestamp image tag (cherry-pick #8529) (#8532)
Co-authored-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
2024-02-15 17:12:30 +00:00
11 changed files with 62 additions and 52 deletions

View File

@ -1,5 +1,5 @@
[bumpversion]
current_version = 2023.10.7
current_version = 2024.2.0-rc1
tag = True
commit = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(?:-(?P<rc_t>[a-zA-Z-]+)(?P<rc_n>[1-9]\\d*))?

View File

@ -78,8 +78,9 @@ runs:
suffix = f"-{image_arch}"
for name in image_names:
image_tags += [
f"{name}:gh-{sha}{suffix}",
f"{name}:gh-{safe_branch_name}{suffix}",
f"{name}:gh-{sha}{suffix}", # Used for ArgoCD and PR comments
f"{name}:gh-{safe_branch_name}{suffix}", # For convenience
f"{name}:gh-{safe_branch_name}-{int(time())}-{sha[:7]}{suffix}", # Use by FluxCD
]
image_main_tag = image_tags[0]

View File

@ -3,7 +3,7 @@
from os import environ
from typing import Optional
__version__ = "2023.10.7"
__version__ = "2024.2.0"
ENV_GIT_HASH_KEY = "GIT_BUILD_HASH"

View File

@ -32,7 +32,7 @@ services:
volumes:
- redis:/data
server:
image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2023.10.7}
image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2024.2.0}
restart: unless-stopped
command: server
environment:
@ -53,7 +53,7 @@ services:
- postgresql
- redis
worker:
image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2023.10.7}
image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2024.2.0}
restart: unless-stopped
command: worker
environment:

View File

@ -29,4 +29,4 @@ func UserAgent() string {
return fmt.Sprintf("authentik@%s", FullVersion())
}
const VERSION = "2023.10.7"
const VERSION = "2024.2.0"

View File

@ -86,6 +86,7 @@ elif [[ "$1" == "bash" ]]; then
/bin/bash
elif [[ "$1" == "test-all" ]]; then
prepare_debug
chmod 777 /root
check_if_root "python -m manage test authentik"
elif [[ "$1" == "healthcheck" ]]; then
run_authentik healthcheck $(cat $MODE_FILE)

View File

@ -113,7 +113,7 @@ filterwarnings = [
[tool.poetry]
name = "authentik"
version = "2023.10.7"
version = "2024.2.0"
description = ""
authors = ["authentik Team <hello@goauthentik.io>"]

View File

@ -1,7 +1,7 @@
openapi: 3.0.3
info:
title: authentik
version: 2023.10.7
version: 2024.2.0
description: Making authentication simple.
contact:
email: hello@goauthentik.io

View File

@ -22,25 +22,36 @@ import { AdminApi, Settings, SettingsRequest } from "@goauthentik/api";
@customElement("ak-admin-settings-form")
export class AdminSettingsForm extends Form<SettingsRequest> {
@property({ attribute: false })
set settings(value: Settings) {
//
// Custom property accessors in Lit 2 require a manual call to requestUpdate(). See:
// https://lit.dev/docs/v2/components/properties/#accessors-custom
//
set settings(value: Settings | undefined) {
this._settings = value;
this.requestUpdate();
}
@property({ type: Object })
get settings() {
return this._settings;
}
private _settings?: Settings;
static get styles(): CSSResult[] {
return super.styles.concat(PFList);
}
getSuccessMessage(): string {
return msg("Successfully updated settings.");
}
async send(data: SettingsRequest): Promise<Settings> {
return new AdminApi(DEFAULT_CONFIG).adminSettingsUpdate({
const result = await new AdminApi(DEFAULT_CONFIG).adminSettingsUpdate({
settingsRequest: data,
});
}
static get styles(): CSSResult[] {
return super.styles.concat(PFList);
this.dispatchEvent(new CustomEvent("ak-admin-setting-changed"));
return result;
}
renderForm(): TemplateResult {

View File

@ -14,8 +14,8 @@ import "@goauthentik/elements/buttons/SpinnerButton";
import "@goauthentik/elements/forms/ModalForm";
import { msg } from "@lit/localize";
import { CSSResult, TemplateResult, html } from "lit";
import { customElement, property } from "lit/decorators.js";
import { html, nothing } from "lit";
import { customElement, query, state } from "lit/decorators.js";
import PFBanner from "@patternfly/patternfly/components/Banner/banner.css";
import PFButton from "@patternfly/patternfly/components/Button/button.css";
@ -32,7 +32,7 @@ import { AdminApi, Settings } from "@goauthentik/api";
@customElement("ak-admin-settings")
export class AdminSettingsPage extends AKElement {
static get styles(): CSSResult[] {
static get styles() {
return [
PFBase,
PFButton,
@ -46,41 +46,46 @@ export class AdminSettingsPage extends AKElement {
PFBanner,
];
}
@property({ attribute: false })
@query("ak-admin-settings-form#form")
form?: AdminSettingsForm;
@state()
settings?: Settings;
loadSettings(): void {
new AdminApi(DEFAULT_CONFIG).adminSettingsRetrieve().then((settings) => {
constructor() {
super();
AdminSettingsPage.fetchSettings().then((settings) => {
this.settings = settings;
});
this.save = this.save.bind(this);
this.reset = this.reset.bind(this);
this.addEventListener("ak-admin-setting-changed", this.handleUpdate.bind(this));
}
firstUpdated(): void {
this.loadSettings();
static async fetchSettings() {
return await new AdminApi(DEFAULT_CONFIG).adminSettingsRetrieve();
}
async save(): Promise<void> {
const form = this.shadowRoot?.querySelector<AdminSettingsForm>("ak-admin-settings-form");
if (!form) {
async handleUpdate() {
this.settings = await AdminSettingsPage.fetchSettings();
}
async save() {
if (!this.form) {
return;
}
await form.submit(new Event("submit"));
this.resetForm();
await this.form.submit(new Event("submit"));
this.settings = await AdminSettingsPage.fetchSettings();
}
resetForm(): void {
const form = this.shadowRoot?.querySelector<AdminSettingsForm>("ak-admin-settings-form");
if (!form) {
return;
}
this.loadSettings();
form.settings = this.settings!;
form.resetForm();
async reset() {
this.form?.resetForm();
}
render(): TemplateResult {
render() {
if (!this.settings) {
return html``;
return nothing;
}
return html`
<ak-page-header icon="fa fa-cog" header="" description="">
@ -93,18 +98,10 @@ export class AdminSettingsPage extends AKElement {
</ak-admin-settings-form>
</div>
<div class="pf-c-card__footer">
<ak-spinner-button
.callAction=${async () => {
await this.save();
}}
class="pf-m-primary"
<ak-spinner-button .callAction=${this.save} class="pf-m-primary"
>${msg("Save")}</ak-spinner-button
>
<ak-spinner-button
.callAction=${() => {
this.resetForm();
}}
class="pf-m-secondary"
<ak-spinner-button .callAction=${this.reset} class="pf-m-secondary"
>${msg("Cancel")}</ak-spinner-button
>
</div>

View File

@ -3,7 +3,7 @@ export const SUCCESS_CLASS = "pf-m-success";
export const ERROR_CLASS = "pf-m-danger";
export const PROGRESS_CLASS = "pf-m-in-progress";
export const CURRENT_CLASS = "pf-m-current";
export const VERSION = "2023.10.7";
export const VERSION = "2024.2.0";
export const TITLE_DEFAULT = "authentik";
export const ROUTE_SEPARATOR = ";";