web/admin: fix error adding users to groups (#5016)

* web/admin: fix error adding users to groups

and vice versa

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* remove seed

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L 2023-03-20 18:15:36 +01:00 committed by GitHub
parent eb78632853
commit 32840d3909
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 5 deletions

2
go.mod
View File

@ -1,6 +1,6 @@
module goauthentik.io module goauthentik.io
go 1.18 go 1.20
require ( require (
github.com/Netflix/go-env v0.0.0-20210215222557-e437a7e7f9fb github.com/Netflix/go-env v0.0.0-20210215222557-e437a7e7f9fb

View File

@ -1,7 +1,6 @@
package common package common
import ( import (
"math/rand"
"os" "os"
"os/signal" "os/signal"
"syscall" "syscall"
@ -11,7 +10,6 @@ import (
) )
func Init() chan os.Signal { func Init() chan os.Signal {
rand.Seed(time.Now().UnixNano())
interrupt := make(chan os.Signal, 1) interrupt := make(chan os.Signal, 1)
signal.Notify(interrupt, os.Interrupt) signal.Notify(interrupt, os.Interrupt)
signal.Notify(interrupt, syscall.SIGINT) signal.Notify(interrupt, syscall.SIGINT)

View File

@ -2,7 +2,7 @@ import { AKElement } from "@goauthentik/elements/Base";
import { Chip } from "@goauthentik/elements/chips/Chip"; import { Chip } from "@goauthentik/elements/chips/Chip";
import { CSSResult, TemplateResult, css, html } from "lit"; import { CSSResult, TemplateResult, css, html } from "lit";
import { customElement } from "lit/decorators.js"; import { customElement, property } from "lit/decorators.js";
import PFButton from "@patternfly/patternfly/components/Button/button.css"; import PFButton from "@patternfly/patternfly/components/Button/button.css";
import PFChip from "@patternfly/patternfly/components/Chip/chip.css"; import PFChip from "@patternfly/patternfly/components/Chip/chip.css";
@ -28,6 +28,9 @@ export class ChipGroup extends AKElement {
]; ];
} }
@property()
name?: string;
set value(v: (string | number | undefined)[]) { set value(v: (string | number | undefined)[]) {
return; return;
} }

View File

@ -201,7 +201,7 @@ export class Form<T> extends AKElement {
json: { [key: string]: unknown }, json: { [key: string]: unknown },
): void { ): void {
let parent = json; let parent = json;
if (!element.name.includes(".")) { if (!element.name?.includes(".")) {
parent[element.name] = value; parent[element.name] = value;
return; return;
} }