chore: v0.5.8

This commit is contained in:
Aarnav Tale 2025-04-03 12:26:48 -04:00
parent 9b09b13b5f
commit 69c6fc4847
No known key found for this signature in database
5 changed files with 27 additions and 8 deletions

View File

@ -1,3 +1,11 @@
### 0.5.8 (April 3, 2025)
- You can now skip the onboarding page if desired.
- Added the UI to change user roles in the dashboard.
- Fixed an issue where integrations would throw instead of loading properly.
- Loading the ACL page no longer spams blank updates to the Headscale database (fixes [#151](https://github.com/tale/headplane/issues/151))
- Automatically create `/var/lib/headplane` in the Docker container (fixes [#166](https://github.com/tale/headplane/issues/166))
- OIDC logout with `disable_api_key_login` set to true will not automatically login again (fixes [#149](https://github.com/tale/headplane/issues/149))
### 0.5.7 (April 2, 2025) ### 0.5.7 (April 2, 2025)
- Hotfix an issue where assets aren't served under `/admin` or the prefix. - Hotfix an issue where assets aren't served under `/admin` or the prefix.

View File

@ -86,7 +86,11 @@ class Sessionizer {
} }
roleForSubject(subject: string): keyof typeof Roles | undefined { roleForSubject(subject: string): keyof typeof Roles | undefined {
const role = this.caps[subject].c; const role = this.caps[subject]?.c;
if (!role) {
return;
}
// We need this in string form based on Object.keys of the roles // We need this in string form based on Object.keys of the roles
for (const [key, value] of Object.entries(Roles)) { for (const [key, value] of Object.entries(Roles)) {
if (value === role) { if (value === role) {
@ -96,7 +100,7 @@ class Sessionizer {
} }
onboardForSubject(subject: string) { onboardForSubject(subject: string) {
return this.caps[subject].oo ?? false; return this.caps[subject]?.oo ?? false;
} }
// Given an OR of capabilities, check if the session has the required // Given an OR of capabilities, check if the session has the required
@ -201,14 +205,21 @@ class Sessionizer {
return false; return false;
} }
this.caps[subject].c = Roles[role]; this.caps[subject] = {
...this.caps[subject], // Preserve the existing capabilities if any
c: Roles[role],
};
await this.flushUserDatabase(); await this.flushUserDatabase();
return true; return true;
} }
// Overrides the onboarding status for a subject // Overrides the onboarding status for a subject
async overrideOnboarding(subject: string, onboarding: boolean) { async overrideOnboarding(subject: string, onboarding: boolean) {
this.caps[subject].oo = onboarding; this.caps[subject] = {
...this.caps[subject], // Preserve the existing capabilities if any
oo: onboarding,
};
await this.flushUserDatabase(); await this.flushUserDatabase();
} }

View File

@ -34,7 +34,7 @@ Here is what a sample Docker Compose deployment would look like:
services: services:
headplane: headplane:
# I recommend you pin the version to a specific release # I recommend you pin the version to a specific release
image: ghcr.io/tale/headplane:0.5.7 image: ghcr.io/tale/headplane:0.5.8
container_name: headplane container_name: headplane
restart: unless-stopped restart: unless-stopped
ports: ports:
@ -151,7 +151,7 @@ spec:
serviceAccountName: default serviceAccountName: default
containers: containers:
- name: headplane - name: headplane
image: ghcr.io/tale/headplane:0.5.7 image: ghcr.io/tale/headplane:0.5.8
env: env:
# Set these if the pod name for Headscale is not static # Set these if the pod name for Headscale is not static
# We will use the downward API to get the pod name instead # We will use the downward API to get the pod name instead

View File

@ -19,7 +19,7 @@ Here is what a sample Docker Compose deployment would look like:
services: services:
headplane: headplane:
# I recommend you pin the version to a specific release # I recommend you pin the version to a specific release
image: ghcr.io/tale/headplane:0.5.7 image: ghcr.io/tale/headplane:0.5.8
container_name: headplane container_name: headplane
restart: unless-stopped restart: unless-stopped
ports: ports:

View File

@ -2,7 +2,7 @@
"name": "headplane", "name": "headplane",
"private": true, "private": true,
"sideEffects": false, "sideEffects": false,
"version": "0.5.7", "version": "0.5.8",
"type": "module", "type": "module",
"scripts": { "scripts": {
"build": "react-router build", "build": "react-router build",