web/admin: fix custom scope mappings being selected by default in proxy provider (#13735)
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
@ -1,5 +1,4 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { DualSelectPair } from "@goauthentik/elements/ak-dual-select/types.js";
|
|
||||||
|
|
||||||
import { PropertymappingsApi, ScopeMapping } from "@goauthentik/api";
|
import { PropertymappingsApi, ScopeMapping } from "@goauthentik/api";
|
||||||
|
|
||||||
@ -22,11 +21,7 @@ export async function propertyMappingsProvider(page = 1, search = "") {
|
|||||||
|
|
||||||
export function propertyMappingsSelector(instanceMappings?: string[]) {
|
export function propertyMappingsSelector(instanceMappings?: string[]) {
|
||||||
if (!instanceMappings) {
|
if (!instanceMappings) {
|
||||||
return async (mappings: DualSelectPair<ScopeMapping>[]) =>
|
return async () => [];
|
||||||
mappings.filter(
|
|
||||||
([_0, _1, _2, scope]: DualSelectPair<ScopeMapping>) =>
|
|
||||||
!(scope?.managed ?? "").startsWith("goauthentik.io/providers"),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return async () => {
|
return async () => {
|
||||||
|
Reference in New Issue
Block a user