@keycloak/keycloak-admin-ui 26.5.7 → 26.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/.vite/manifest.json +40 -40
- package/lib/{AddJWTAuthorizationGrant-B9fNafs-.js → AddJWTAuthorizationGrant-CeMENUIM.js} +19 -19
- package/lib/{AddJWTAuthorizationGrant-B9fNafs-.js.map → AddJWTAuthorizationGrant-CeMENUIM.js.map} +1 -1
- package/lib/{AddKubernetesConnect-_-fIYkCu.js → AddKubernetesConnect-0RUT9aV2.js} +13 -13
- package/lib/{AddKubernetesConnect-_-fIYkCu.js.map → AddKubernetesConnect-0RUT9aV2.js.map} +1 -1
- package/lib/{AddOAuth2-GWdhXpZu.js → AddOAuth2-Cw67bzVu.js} +12 -12
- package/lib/{AddOAuth2-GWdhXpZu.js.map → AddOAuth2-Cw67bzVu.js.map} +1 -1
- package/lib/{AddSpiffeConnect-CEycf6Um.js → AddSpiffeConnect-Cd9x7mR2.js} +9 -9
- package/lib/{AddSpiffeConnect-CEycf6Um.js.map → AddSpiffeConnect-Cd9x7mR2.js.map} +1 -1
- package/lib/{CreateFlow-C1gSi1GV.js → CreateFlow-9cA71I0U.js} +10 -10
- package/lib/{CreateFlow-C1gSi1GV.js.map → CreateFlow-9cA71I0U.js.map} +1 -1
- package/lib/DetailOrganization-C14l_h62.js +204 -0
- package/lib/DetailOrganization-C14l_h62.js.map +1 -0
- package/lib/{ExecutorForm-D3r69dqU.js → ExecutorForm-BwTQyA36.js} +17 -17
- package/lib/{ExecutorForm-D3r69dqU.js.map → ExecutorForm-BwTQyA36.js.map} +1 -1
- package/lib/{FlowDetails-DNNCBfY5.js → FlowDetails-BpGnLs_D.js} +1998 -2039
- package/lib/FlowDetails-BpGnLs_D.js.map +1 -0
- package/lib/NewOrganization-SUmXcFih.js +36 -0
- package/lib/{NewOrganization-KSp9gXMo.js.map → NewOrganization-SUmXcFih.js.map} +1 -1
- package/lib/{PermissionConfigurationDetails-LVkEXehk.js → PermissionConfigurationDetails-B7AeRfGJ.js} +118 -118
- package/lib/{PermissionConfigurationDetails-LVkEXehk.js.map → PermissionConfigurationDetails-B7AeRfGJ.js.map} +1 -1
- package/lib/{PermissionDetails-DlPJ8m6r.js → PermissionDetails-CY6ytovN.js} +79 -79
- package/lib/{PermissionDetails-DlPJ8m6r.js.map → PermissionDetails-CY6ytovN.js.map} +1 -1
- package/lib/{RealmSection-BKt0CL1J.js → RealmSection-CMquQhw3.js} +26 -26
- package/lib/{RealmSection-BKt0CL1J.js.map → RealmSection-CMquQhw3.js.map} +1 -1
- package/lib/{ResourceDetails-CV230nyS.js → ResourceDetails-BsRxSUu-.js} +36 -36
- package/lib/ResourceDetails-BsRxSUu-.js.map +1 -0
- package/lib/{ScopeDetails-BleAAOMS.js → ScopeDetails-puMEG5G1.js} +27 -27
- package/lib/{ScopeDetails-BleAAOMS.js.map → ScopeDetails-puMEG5G1.js.map} +1 -1
- package/lib/{ScopePicker-BpZ35vej.js → ScopePicker-Bc9l9PJg.js} +15 -15
- package/lib/{ScopePicker-BpZ35vej.js.map → ScopePicker-Bc9l9PJg.js.map} +1 -1
- package/lib/WorkflowDetailForm-B-cQjnC9.js +147 -0
- package/lib/WorkflowDetailForm-B-cQjnC9.js.map +1 -0
- package/lib/{WorkflowsSection-C6tPZTDa.js → WorkflowsSection-BB9dHYmO.js} +20 -20
- package/lib/{WorkflowsSection-C6tPZTDa.js.map → WorkflowsSection-BB9dHYmO.js.map} +1 -1
- package/lib/client-scopes/details/oid4vciAttributes.d.ts +4 -0
- package/lib/clients/keys/Certificate.d.ts +3 -1
- package/lib/components/dynamic/MapComponent.d.ts +1 -1
- package/lib/components/key-value-form/KeyValueInput.d.ts +4 -1
- package/lib/components/realm-loa-mapping/RealmLoAMapping.d.ts +13 -0
- package/lib/components/role-mapping/queries.d.ts +1 -2
- package/lib/components/role-mapping/resource.d.ts +33 -0
- package/lib/components/view-header/ViewHeader.d.ts +2 -1
- package/lib/context/auth/admin-ui-endpoint.d.ts +1 -0
- package/lib/context/group-resource/GroupResourceContext.d.ts +9 -0
- package/lib/groups/GroupsSection.d.ts +3 -1
- package/lib/groups/MembersModal.d.ts +5 -1
- package/lib/groups/MembershipsModal.d.ts +2 -1
- package/lib/groups/routes/Groups.d.ts +3 -0
- package/lib/help-urls.d.ts +1 -0
- package/lib/i18n/constants.d.ts +1 -0
- package/lib/i18n/i18n.d.ts +0 -1
- package/lib/{index-D3mEQ9NL.js → index-iLxEY-Jz.js} +44585 -35236
- package/lib/{index-D3mEQ9NL.js.map → index-iLxEY-Jz.js.map} +1 -1
- package/lib/index.d.ts +6 -4
- package/lib/keycloak-admin-ui.css +1 -1
- package/lib/keycloak-admin-ui.js +298 -294
- package/lib/organizations/routes/EditOrganization.d.ts +1 -1
- package/lib/realm-settings/routes/ThemesTab.d.ts +1 -1
- package/lib/realm-settings/themes/BackgroundContext.d.ts +9 -0
- package/lib/realm-settings/themes/ColorControl.d.ts +8 -0
- package/lib/realm-settings/themes/DefaultColorAccordion.d.ts +7 -0
- package/lib/realm-settings/themes/FileNameDialog.d.ts +1 -1
- package/lib/realm-settings/themes/LoginPreviewWindow.d.ts +5 -0
- package/lib/realm-settings/themes/LoginThemeProperties.d.ts +63 -0
- package/lib/realm-settings/themes/PatternflyVars.d.ts +29 -8
- package/lib/realm-settings/themes/QuickTheme.d.ts +17 -0
- package/lib/realm-settings/themes/ThemeColors.d.ts +3 -3
- package/lib/realm-settings/themes/ThemesTab.d.ts +0 -6
- package/lib/realm-settings/themes/UploadJar.d.ts +1 -1
- package/lib/realm-settings/themes/fileUtils.d.ts +1 -0
- package/lib/user/UserWorkflows.d.ts +5 -0
- package/lib/user/routes/User.d.ts +1 -1
- package/lib/user/utils/user-profile.d.ts +10 -0
- package/lib/utils/useIsFeatureEnabled.d.ts +4 -1
- package/package.json +10 -9
- package/lib/DetailOrganization-CV52xkX3.js +0 -194
- package/lib/DetailOrganization-CV52xkX3.js.map +0 -1
- package/lib/FlowDetails-DNNCBfY5.js.map +0 -1
- package/lib/NewOrganization-KSp9gXMo.js +0 -36
- package/lib/ResourceDetails-CV230nyS.js.map +0 -1
- package/lib/WorkflowDetailForm-CH1O9UEB.js +0 -4938
- package/lib/WorkflowDetailForm-CH1O9UEB.js.map +0 -1
- package/lib/theme/login.css +0 -94
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as e, jsxs as T, Fragment as
|
|
2
|
-
import { u as
|
|
3
|
-
import { useEffect as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { useNavigate as
|
|
6
|
-
import { S as
|
|
7
|
-
const
|
|
1
|
+
import { jsx as e, jsxs as T, Fragment as j } from "react/jsx-runtime";
|
|
2
|
+
import { u as q, a as ce, b as W, bd as le, aA as de, q as X, at as pe, M as _, j as $, k as me, F as Q, X as U, K as ye, be as R, bf as ue, A as Y, B as F, l as V, bg as ge, bh as Pe, bi as fe, bj as G, bk as he, bl as be, bm as ve, bn as Ce, bo as Te, bp as Se, bq as we, br as xe, e as M, U as Z, n as L, bs as H, b1 as ee, bt as Ae, p as ie, J as se, O as te, Q as K, S as ne, bu as oe, bv as ae, am as Oe, aw as ke, an as Ie, az as De, a7 as Ee, aq as Fe, bw as Ne, aa as Ve, bx as J, au as Ke, V as Re, P as Le, c as qe, by as ze, bz as Me, bA as Be } from "./index-iLxEY-Jz.js";
|
|
3
|
+
import { useEffect as je, useState as x, useMemo as He } from "react";
|
|
4
|
+
import { useTranslation as z } from "react-i18next";
|
|
5
|
+
import { useNavigate as Ue, Link as Ge } from "react-router-dom";
|
|
6
|
+
import { S as Je } from "./ScopePicker-Bc9l9PJg.js";
|
|
7
|
+
const We = {
|
|
8
8
|
name: "",
|
|
9
9
|
description: "",
|
|
10
10
|
type: "group",
|
|
@@ -16,64 +16,64 @@ const Je = {
|
|
|
16
16
|
client: we,
|
|
17
17
|
user: Se,
|
|
18
18
|
"client-scope": Te,
|
|
19
|
-
group:
|
|
19
|
+
group: G,
|
|
20
20
|
regex: Ce,
|
|
21
21
|
role: ve,
|
|
22
22
|
time: be,
|
|
23
23
|
js: he,
|
|
24
|
-
default:
|
|
25
|
-
},
|
|
24
|
+
default: G
|
|
25
|
+
}, Xe = (a) => a in B, _e = ({
|
|
26
26
|
permissionClientId: a,
|
|
27
27
|
providers: l,
|
|
28
28
|
policies: w,
|
|
29
29
|
toggleDialog: t,
|
|
30
|
-
onAssign:
|
|
30
|
+
onAssign: o
|
|
31
31
|
}) => {
|
|
32
|
-
const { adminClient:
|
|
32
|
+
const { adminClient: n } = q(), { realmRepresentation: A } = ce(), { t: d } = z(), u = W({
|
|
33
33
|
mode: "onChange",
|
|
34
|
-
defaultValues:
|
|
35
|
-
}), { addAlert:
|
|
34
|
+
defaultValues: We
|
|
35
|
+
}), { addAlert: O, addError: E } = X(), { handleSubmit: C, reset: b } = u, k = A?.adminPermissionsEnabled, P = pe({
|
|
36
36
|
control: u.control,
|
|
37
37
|
name: "type"
|
|
38
38
|
});
|
|
39
39
|
function r() {
|
|
40
|
-
return P &&
|
|
40
|
+
return P && Xe(P) ? B[P] : B.default;
|
|
41
41
|
}
|
|
42
42
|
const m = r();
|
|
43
|
-
|
|
43
|
+
je(() => {
|
|
44
44
|
if (P) {
|
|
45
|
-
const { name: c, description: v, decisionStrategy:
|
|
45
|
+
const { name: c, description: v, decisionStrategy: I, logic: S } = u.getValues();
|
|
46
46
|
b({
|
|
47
47
|
type: P,
|
|
48
48
|
name: c,
|
|
49
49
|
description: v,
|
|
50
|
-
decisionStrategy:
|
|
50
|
+
decisionStrategy: I,
|
|
51
51
|
logic: S
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
}, [P, b, u]);
|
|
55
55
|
const y = async (c) => {
|
|
56
|
-
const { groups: v, roles:
|
|
56
|
+
const { groups: v, roles: I, policies: S, clients: D, ...s } = c, g = {
|
|
57
57
|
...s,
|
|
58
58
|
...v && v.length > 0 && { groups: v },
|
|
59
|
-
...
|
|
59
|
+
...I && I.length > 0 && { roles: I },
|
|
60
60
|
...S && S.length > 0 && { policies: S },
|
|
61
61
|
...D && D.length > 0 && { clients: D },
|
|
62
62
|
...s.type === "group" && (!v || v.length === 0) && { groups: [] },
|
|
63
63
|
...s.type === "client" && (!D || D.length === 0) && { clients: [] }
|
|
64
64
|
};
|
|
65
65
|
try {
|
|
66
|
-
const p = await
|
|
66
|
+
const p = await n.clients.createPolicy(
|
|
67
67
|
{ id: a, type: P },
|
|
68
68
|
g
|
|
69
69
|
);
|
|
70
|
-
|
|
70
|
+
o(p), t(), O(d("createPolicySuccess"), M.success);
|
|
71
71
|
} catch (p) {
|
|
72
72
|
E("policySaveError", p);
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
75
|
return /* @__PURE__ */ e(
|
|
76
|
-
|
|
76
|
+
_,
|
|
77
77
|
{
|
|
78
78
|
"aria-label": d("createPermissionPolicy"),
|
|
79
79
|
variant: $.medium,
|
|
@@ -89,16 +89,16 @@ const Je = {
|
|
|
89
89
|
},
|
|
90
90
|
isHorizontal: !0,
|
|
91
91
|
children: [
|
|
92
|
-
/* @__PURE__ */ T(
|
|
92
|
+
/* @__PURE__ */ T(Q, { ...u, children: [
|
|
93
93
|
/* @__PURE__ */ e(
|
|
94
|
-
|
|
94
|
+
U,
|
|
95
95
|
{
|
|
96
96
|
name: "name",
|
|
97
97
|
label: d("name"),
|
|
98
98
|
rules: { required: d("required") }
|
|
99
99
|
}
|
|
100
100
|
),
|
|
101
|
-
/* @__PURE__ */ e(
|
|
101
|
+
/* @__PURE__ */ e(U, { name: "description", label: d("description") }),
|
|
102
102
|
l && l.length > 0 && /* @__PURE__ */ e(
|
|
103
103
|
ye,
|
|
104
104
|
{
|
|
@@ -115,7 +115,7 @@ const Je = {
|
|
|
115
115
|
/* @__PURE__ */ e(
|
|
116
116
|
m,
|
|
117
117
|
{
|
|
118
|
-
isPermissionClient:
|
|
118
|
+
isPermissionClient: k,
|
|
119
119
|
permissionClientId: a
|
|
120
120
|
}
|
|
121
121
|
),
|
|
@@ -146,14 +146,14 @@ const Je = {
|
|
|
146
146
|
open: w,
|
|
147
147
|
permissionClientId: t
|
|
148
148
|
}) => {
|
|
149
|
-
const { t:
|
|
149
|
+
const { t: o } = z(), { adminClient: n } = q(), [A, d] = x([]), [u, O] = x(void 0), [E, C] = Z(), [b, k] = x([]);
|
|
150
150
|
L(
|
|
151
|
-
() =>
|
|
151
|
+
() => n.clients.listPolicyProviders({
|
|
152
152
|
id: t
|
|
153
153
|
}),
|
|
154
154
|
(r) => {
|
|
155
155
|
const m = r.filter((y) => y.type !== "resource" && y.type !== "scope").map((y) => y.name).filter((y) => y !== void 0);
|
|
156
|
-
|
|
156
|
+
k(H(m));
|
|
157
157
|
},
|
|
158
158
|
[t]
|
|
159
159
|
);
|
|
@@ -164,17 +164,17 @@ const Je = {
|
|
|
164
164
|
first: r,
|
|
165
165
|
max: m
|
|
166
166
|
};
|
|
167
|
-
return y && (c.name = y), u && (c.type = u), await
|
|
167
|
+
return y && (c.name = y), u && (c.type = u), await n.clients.listPolicies(c) || [];
|
|
168
168
|
};
|
|
169
169
|
return /* @__PURE__ */ e(
|
|
170
|
-
|
|
170
|
+
_,
|
|
171
171
|
{
|
|
172
172
|
variant: $.medium,
|
|
173
|
-
title:
|
|
173
|
+
title: o("assignExistingPolicies"),
|
|
174
174
|
isOpen: w,
|
|
175
175
|
onClose: a,
|
|
176
176
|
actions: [
|
|
177
|
-
/* @__PURE__ */ T(
|
|
177
|
+
/* @__PURE__ */ T(j, { children: [
|
|
178
178
|
/* @__PURE__ */ e(
|
|
179
179
|
F,
|
|
180
180
|
{
|
|
@@ -186,7 +186,7 @@ const Je = {
|
|
|
186
186
|
l(r), a();
|
|
187
187
|
},
|
|
188
188
|
isDisabled: A.length === 0,
|
|
189
|
-
children:
|
|
189
|
+
children: o("assign")
|
|
190
190
|
},
|
|
191
191
|
"assign"
|
|
192
192
|
),
|
|
@@ -199,7 +199,7 @@ const Je = {
|
|
|
199
199
|
onClick: () => {
|
|
200
200
|
d([]), a();
|
|
201
201
|
},
|
|
202
|
-
children:
|
|
202
|
+
children: o("cancel")
|
|
203
203
|
},
|
|
204
204
|
"cancel"
|
|
205
205
|
)
|
|
@@ -209,26 +209,26 @@ const Je = {
|
|
|
209
209
|
ee,
|
|
210
210
|
{
|
|
211
211
|
loader: P,
|
|
212
|
-
ariaLabelKey:
|
|
213
|
-
searchPlaceholderKey:
|
|
212
|
+
ariaLabelKey: o("chooseAPolicyType"),
|
|
213
|
+
searchPlaceholderKey: o("searchClientAuthorizationPolicy"),
|
|
214
214
|
isSearching: !0,
|
|
215
215
|
searchTypeComponent: /* @__PURE__ */ e(
|
|
216
216
|
se,
|
|
217
217
|
{
|
|
218
218
|
onSelect: (r, m) => {
|
|
219
|
-
|
|
219
|
+
O(m), C();
|
|
220
220
|
},
|
|
221
221
|
onOpenChange: C,
|
|
222
222
|
toggle: (r) => /* @__PURE__ */ e(
|
|
223
|
-
|
|
223
|
+
ne,
|
|
224
224
|
{
|
|
225
225
|
ref: r,
|
|
226
226
|
"data-testid": "filter-type-dropdown-existingPolicies",
|
|
227
227
|
id: "toggle-id-10",
|
|
228
228
|
onClick: C,
|
|
229
229
|
icon: /* @__PURE__ */ e(ae, {}),
|
|
230
|
-
statusIcon: /* @__PURE__ */ e(
|
|
231
|
-
children: u ||
|
|
230
|
+
statusIcon: /* @__PURE__ */ e(oe, {}),
|
|
231
|
+
children: u || o("allTypes")
|
|
232
232
|
}
|
|
233
233
|
),
|
|
234
234
|
isOpen: E,
|
|
@@ -237,8 +237,8 @@ const Je = {
|
|
|
237
237
|
K,
|
|
238
238
|
{
|
|
239
239
|
"data-testid": "filter-type-dropdown-existingPolicies-all",
|
|
240
|
-
onClick: () =>
|
|
241
|
-
children:
|
|
240
|
+
onClick: () => O(void 0),
|
|
241
|
+
children: o("allTypes")
|
|
242
242
|
},
|
|
243
243
|
"all"
|
|
244
244
|
),
|
|
@@ -246,7 +246,7 @@ const Je = {
|
|
|
246
246
|
K,
|
|
247
247
|
{
|
|
248
248
|
"data-testid": `filter-type-dropdown-existingPolicies-${r}`,
|
|
249
|
-
onClick: () =>
|
|
249
|
+
onClick: () => O(r),
|
|
250
250
|
children: r
|
|
251
251
|
},
|
|
252
252
|
r
|
|
@@ -267,8 +267,8 @@ const Je = {
|
|
|
267
267
|
emptyState: /* @__PURE__ */ e(
|
|
268
268
|
ie,
|
|
269
269
|
{
|
|
270
|
-
message:
|
|
271
|
-
instructions:
|
|
270
|
+
message: o("emptyAssignExistingPolicies"),
|
|
271
|
+
instructions: o("emptyAssignExistingPoliciesInstructions")
|
|
272
272
|
}
|
|
273
273
|
)
|
|
274
274
|
},
|
|
@@ -276,23 +276,23 @@ const Je = {
|
|
|
276
276
|
)
|
|
277
277
|
}
|
|
278
278
|
);
|
|
279
|
-
},
|
|
279
|
+
}, Qe = ({
|
|
280
280
|
permissionClientId: a,
|
|
281
281
|
providers: l,
|
|
282
282
|
policies: w,
|
|
283
283
|
resourceType: t
|
|
284
284
|
}) => {
|
|
285
|
-
const { adminClient:
|
|
285
|
+
const { adminClient: o } = q(), { t: n } = z(), {
|
|
286
286
|
control: A,
|
|
287
287
|
getValues: d,
|
|
288
288
|
setValue: u,
|
|
289
|
-
trigger:
|
|
289
|
+
trigger: O,
|
|
290
290
|
formState: { errors: E }
|
|
291
|
-
} =
|
|
291
|
+
} = Oe(), C = d("policies"), [b, k] = x(!1), [P, r] = x(!1), [m, y] = x([]), [c, v] = x(void 0), [I, S] = Z();
|
|
292
292
|
L(
|
|
293
293
|
() => C && C.length > 0 ? Promise.all(
|
|
294
294
|
C.map(
|
|
295
|
-
(i) =>
|
|
295
|
+
(i) => o.clients.findOnePolicyWithType({
|
|
296
296
|
id: a,
|
|
297
297
|
type: i.type,
|
|
298
298
|
policyId: i.id
|
|
@@ -305,7 +305,7 @@ const Je = {
|
|
|
305
305
|
},
|
|
306
306
|
[w]
|
|
307
307
|
);
|
|
308
|
-
const D =
|
|
308
|
+
const D = H(
|
|
309
309
|
l ? l.filter((i) => i.type !== "resource" && i.type !== "scope").map((i) => i.name) : []
|
|
310
310
|
), s = async (i) => {
|
|
311
311
|
const f = i.map(({ policy: h }) => ({
|
|
@@ -314,7 +314,7 @@ const Je = {
|
|
|
314
314
|
u("policies", [
|
|
315
315
|
...d("policies") || [],
|
|
316
316
|
...f
|
|
317
|
-
]), await
|
|
317
|
+
]), await O("policies"), y([
|
|
318
318
|
...m,
|
|
319
319
|
...i.map(({ policy: h }) => h)
|
|
320
320
|
]);
|
|
@@ -335,13 +335,13 @@ const Je = {
|
|
|
335
335
|
(i) => R(i.type) === c
|
|
336
336
|
) : m;
|
|
337
337
|
return /* @__PURE__ */ T(
|
|
338
|
-
|
|
338
|
+
ke,
|
|
339
339
|
{
|
|
340
|
-
label:
|
|
340
|
+
label: n("policies"),
|
|
341
341
|
labelIcon: /* @__PURE__ */ e(
|
|
342
342
|
Ee,
|
|
343
343
|
{
|
|
344
|
-
helpText:
|
|
344
|
+
helpText: n("permissionPoliciesHelp"),
|
|
345
345
|
fieldLabelId: "policies"
|
|
346
346
|
}
|
|
347
347
|
),
|
|
@@ -349,7 +349,7 @@ const Je = {
|
|
|
349
349
|
isRequired: !0,
|
|
350
350
|
children: [
|
|
351
351
|
/* @__PURE__ */ e(
|
|
352
|
-
|
|
352
|
+
Ie,
|
|
353
353
|
{
|
|
354
354
|
name: "policies",
|
|
355
355
|
control: A,
|
|
@@ -357,18 +357,18 @@ const Je = {
|
|
|
357
357
|
rules: {
|
|
358
358
|
validate: (i) => !i || i.length === 0 ? !1 : i.every(({ id: f }) => f && f.trim().length > 0)
|
|
359
359
|
},
|
|
360
|
-
render: () => /* @__PURE__ */ T(
|
|
360
|
+
render: () => /* @__PURE__ */ T(j, { children: [
|
|
361
361
|
b && /* @__PURE__ */ e(
|
|
362
362
|
$e,
|
|
363
363
|
{
|
|
364
364
|
permissionClientId: a,
|
|
365
365
|
open: b,
|
|
366
|
-
toggleDialog: () =>
|
|
366
|
+
toggleDialog: () => k(!b),
|
|
367
367
|
onAssign: s
|
|
368
368
|
}
|
|
369
369
|
),
|
|
370
370
|
P && /* @__PURE__ */ e(
|
|
371
|
-
|
|
371
|
+
_e,
|
|
372
372
|
{
|
|
373
373
|
toggleDialog: () => r(!P),
|
|
374
374
|
permissionClientId: a,
|
|
@@ -386,9 +386,9 @@ const Je = {
|
|
|
386
386
|
"data-testid": "select-assignedPolicy-button",
|
|
387
387
|
variant: "secondary",
|
|
388
388
|
onClick: () => {
|
|
389
|
-
|
|
389
|
+
k(!0);
|
|
390
390
|
},
|
|
391
|
-
children:
|
|
391
|
+
children: n("assignExistingPolicies")
|
|
392
392
|
}
|
|
393
393
|
),
|
|
394
394
|
/* @__PURE__ */ e(
|
|
@@ -400,7 +400,7 @@ const Je = {
|
|
|
400
400
|
onClick: () => {
|
|
401
401
|
r(!0);
|
|
402
402
|
},
|
|
403
|
-
children:
|
|
403
|
+
children: n("createNewPolicy")
|
|
404
404
|
}
|
|
405
405
|
)
|
|
406
406
|
] })
|
|
@@ -410,8 +410,8 @@ const Je = {
|
|
|
410
410
|
ee,
|
|
411
411
|
{
|
|
412
412
|
loader: p,
|
|
413
|
-
ariaLabelKey:
|
|
414
|
-
searchPlaceholderKey:
|
|
413
|
+
ariaLabelKey: n("policies"),
|
|
414
|
+
searchPlaceholderKey: n("searchClientAuthorizationPolicy"),
|
|
415
415
|
isSearching: !0,
|
|
416
416
|
searchTypeComponent: /* @__PURE__ */ e(
|
|
417
417
|
se,
|
|
@@ -421,25 +421,25 @@ const Je = {
|
|
|
421
421
|
},
|
|
422
422
|
onOpenChange: S,
|
|
423
423
|
toggle: (i) => /* @__PURE__ */ e(
|
|
424
|
-
|
|
424
|
+
ne,
|
|
425
425
|
{
|
|
426
426
|
ref: i,
|
|
427
427
|
"data-testid": "filter-type-dropdown-existingPolicies",
|
|
428
428
|
id: "toggle-id-10",
|
|
429
429
|
onClick: S,
|
|
430
430
|
icon: /* @__PURE__ */ e(ae, {}),
|
|
431
|
-
statusIcon: /* @__PURE__ */ e(
|
|
432
|
-
children: c ? R(c) :
|
|
431
|
+
statusIcon: /* @__PURE__ */ e(oe, {}),
|
|
432
|
+
children: c ? R(c) : n("allTypes")
|
|
433
433
|
}
|
|
434
434
|
),
|
|
435
|
-
isOpen:
|
|
435
|
+
isOpen: I,
|
|
436
436
|
children: /* @__PURE__ */ T(te, { children: [
|
|
437
437
|
/* @__PURE__ */ e(
|
|
438
438
|
K,
|
|
439
439
|
{
|
|
440
440
|
"data-testid": "filter-type-dropdown-existingPolicies-all",
|
|
441
441
|
onClick: () => v(void 0),
|
|
442
|
-
children:
|
|
442
|
+
children: n("allTypes")
|
|
443
443
|
},
|
|
444
444
|
"all"
|
|
445
445
|
),
|
|
@@ -457,39 +457,39 @@ const Je = {
|
|
|
457
457
|
),
|
|
458
458
|
actionResolver: (i) => [
|
|
459
459
|
{
|
|
460
|
-
title:
|
|
460
|
+
title: n("unAssignPolicy"),
|
|
461
461
|
onClick: () => g(i.data)
|
|
462
462
|
}
|
|
463
463
|
],
|
|
464
464
|
columns: [
|
|
465
|
-
{ name: "name", displayKey:
|
|
465
|
+
{ name: "name", displayKey: n("name") },
|
|
466
466
|
{
|
|
467
467
|
name: "type",
|
|
468
|
-
displayKey:
|
|
468
|
+
displayKey: n("type"),
|
|
469
469
|
cellFormatters: [(i) => R(String(i || ""))]
|
|
470
470
|
},
|
|
471
|
-
{ name: "description", displayKey:
|
|
471
|
+
{ name: "description", displayKey: n("description") }
|
|
472
472
|
],
|
|
473
473
|
emptyState: /* @__PURE__ */ e(
|
|
474
474
|
ie,
|
|
475
475
|
{
|
|
476
|
-
message:
|
|
477
|
-
instructions:
|
|
476
|
+
message: n("emptyAssignExistingPolicies"),
|
|
477
|
+
instructions: n("emptyAssignExistingPoliciesInstructions")
|
|
478
478
|
}
|
|
479
479
|
)
|
|
480
480
|
}
|
|
481
481
|
),
|
|
482
|
-
E.policies && /* @__PURE__ */ e(De, { message:
|
|
482
|
+
E.policies && /* @__PURE__ */ e(De, { message: n("requiredPolicies") })
|
|
483
483
|
]
|
|
484
484
|
}
|
|
485
485
|
);
|
|
486
486
|
};
|
|
487
|
-
function
|
|
488
|
-
const { adminClient: a } =
|
|
487
|
+
function ni() {
|
|
488
|
+
const { adminClient: a } = q(), { t: l } = z(), { realm: w, permissionClientId: t, permissionId: o, resourceType: n } = Fe(), A = Ue(), d = W(), { handleSubmit: u, reset: O } = d, { addAlert: E, addError: C } = X(), [b, k] = x(), [P, r] = x(), [m, y] = x(), c = Ne({
|
|
489
489
|
clientId: t
|
|
490
|
-
}), v =
|
|
491
|
-
() => c.filter(({ type: s }) => s ===
|
|
492
|
-
[c,
|
|
490
|
+
}), v = He(
|
|
491
|
+
() => c.filter(({ type: s }) => s === n).flatMap(({ scopes: s = [] }) => s).map((s) => s || ""),
|
|
492
|
+
[c, n]
|
|
493
493
|
);
|
|
494
494
|
L(
|
|
495
495
|
async () => {
|
|
@@ -509,7 +509,7 @@ function oi() {
|
|
|
509
509
|
(i) => i.type !== "resource" && i.type !== "scope"
|
|
510
510
|
);
|
|
511
511
|
r(
|
|
512
|
-
|
|
512
|
+
H(
|
|
513
513
|
p,
|
|
514
514
|
(i) => i.type
|
|
515
515
|
)
|
|
@@ -518,25 +518,25 @@ function oi() {
|
|
|
518
518
|
[t]
|
|
519
519
|
), L(
|
|
520
520
|
async () => {
|
|
521
|
-
if (!
|
|
521
|
+
if (!o)
|
|
522
522
|
return {};
|
|
523
523
|
const [s, g, p, i] = await Promise.all([
|
|
524
524
|
a.clients.findOnePermission({
|
|
525
525
|
id: t,
|
|
526
526
|
type: "scope",
|
|
527
|
-
permissionId:
|
|
527
|
+
permissionId: o
|
|
528
528
|
}),
|
|
529
529
|
a.clients.getAssociatedResources({
|
|
530
530
|
id: t,
|
|
531
|
-
permissionId:
|
|
531
|
+
permissionId: o
|
|
532
532
|
}),
|
|
533
533
|
a.clients.getAssociatedPolicies({
|
|
534
534
|
id: t,
|
|
535
|
-
permissionId:
|
|
535
|
+
permissionId: o
|
|
536
536
|
}),
|
|
537
537
|
a.clients.getAssociatedScopes({
|
|
538
538
|
id: t,
|
|
539
|
-
permissionId:
|
|
539
|
+
permissionId: o
|
|
540
540
|
})
|
|
541
541
|
]);
|
|
542
542
|
if (!s)
|
|
@@ -550,31 +550,31 @@ function oi() {
|
|
|
550
550
|
},
|
|
551
551
|
({ permission: s, resources: g, policies: p, scopes: i }) => {
|
|
552
552
|
const f = g?.map((N) => N.name) || [], h = p?.map((N) => N.id) || [], re = i?.map((N) => N.name) || [];
|
|
553
|
-
|
|
553
|
+
O({
|
|
554
554
|
...s,
|
|
555
555
|
resources: f,
|
|
556
556
|
policies: p,
|
|
557
557
|
scopes: i
|
|
558
|
-
}),
|
|
558
|
+
}), k({
|
|
559
559
|
...s,
|
|
560
560
|
resources: f,
|
|
561
561
|
policies: h,
|
|
562
562
|
scopes: re
|
|
563
563
|
});
|
|
564
564
|
},
|
|
565
|
-
[t,
|
|
565
|
+
[t, o]
|
|
566
566
|
);
|
|
567
|
-
const
|
|
567
|
+
const I = async (s) => {
|
|
568
568
|
try {
|
|
569
569
|
const g = {
|
|
570
570
|
...s,
|
|
571
571
|
policies: s.policies?.map((p) => p.id),
|
|
572
572
|
scopes: s.scopes?.map((p) => p.name),
|
|
573
|
-
resourceType:
|
|
573
|
+
resourceType: n
|
|
574
574
|
};
|
|
575
|
-
if (
|
|
575
|
+
if (o)
|
|
576
576
|
await a.clients.updatePermission(
|
|
577
|
-
{ id: t, type: "scope", permissionId:
|
|
577
|
+
{ id: t, type: "scope", permissionId: o },
|
|
578
578
|
g
|
|
579
579
|
);
|
|
580
580
|
else {
|
|
@@ -582,18 +582,18 @@ function oi() {
|
|
|
582
582
|
{ id: t, type: "scope" },
|
|
583
583
|
g
|
|
584
584
|
);
|
|
585
|
-
|
|
585
|
+
k(p), A(
|
|
586
586
|
Be({
|
|
587
587
|
realm: w,
|
|
588
588
|
permissionClientId: t,
|
|
589
589
|
permissionId: p.id,
|
|
590
|
-
resourceType:
|
|
590
|
+
resourceType: n
|
|
591
591
|
})
|
|
592
592
|
);
|
|
593
593
|
}
|
|
594
594
|
E(
|
|
595
|
-
l(
|
|
596
|
-
|
|
595
|
+
l(o ? "updatePermissionSuccess" : "createPermissionSuccess"),
|
|
596
|
+
M.success
|
|
597
597
|
);
|
|
598
598
|
} catch (g) {
|
|
599
599
|
C("permissionSaveError", g);
|
|
@@ -610,9 +610,9 @@ function oi() {
|
|
|
610
610
|
await a.clients.delPermission({
|
|
611
611
|
id: t,
|
|
612
612
|
type: "scope",
|
|
613
|
-
permissionId:
|
|
614
|
-
}), E(l("permissionDeletedSuccess"),
|
|
615
|
-
|
|
613
|
+
permissionId: o
|
|
614
|
+
}), E(l("permissionDeletedSuccess"), M.success), A(
|
|
615
|
+
J({
|
|
616
616
|
realm: w,
|
|
617
617
|
permissionClientId: t,
|
|
618
618
|
tab: "permissions"
|
|
@@ -623,14 +623,14 @@ function oi() {
|
|
|
623
623
|
}
|
|
624
624
|
}
|
|
625
625
|
});
|
|
626
|
-
return b ? /* @__PURE__ */ T(
|
|
626
|
+
return b ? /* @__PURE__ */ T(j, { children: [
|
|
627
627
|
/* @__PURE__ */ e(D, {}),
|
|
628
628
|
/* @__PURE__ */ e(
|
|
629
629
|
Re,
|
|
630
630
|
{
|
|
631
|
-
titleKey:
|
|
632
|
-
subKey:
|
|
633
|
-
dropdownItems:
|
|
631
|
+
titleKey: o ? b?.name : l("createPermission"),
|
|
632
|
+
subKey: o ? b?.description : l("createPermissionOfType", { resourceType: n }),
|
|
633
|
+
dropdownItems: o ? [
|
|
634
634
|
/* @__PURE__ */ e(
|
|
635
635
|
K,
|
|
636
636
|
{
|
|
@@ -643,24 +643,24 @@ function oi() {
|
|
|
643
643
|
] : void 0
|
|
644
644
|
}
|
|
645
645
|
),
|
|
646
|
-
/* @__PURE__ */ e(Le, { variant: "light", children: /* @__PURE__ */ T(
|
|
647
|
-
/* @__PURE__ */ T(
|
|
648
|
-
/* @__PURE__ */ e(
|
|
646
|
+
/* @__PURE__ */ e(Le, { variant: "light", children: /* @__PURE__ */ T(qe, { isHorizontal: !0, onSubmit: u(I), role: "anyone", children: [
|
|
647
|
+
/* @__PURE__ */ T(Q, { ...d, children: [
|
|
648
|
+
/* @__PURE__ */ e(ze, { clientId: t }),
|
|
649
649
|
/* @__PURE__ */ e(
|
|
650
|
-
|
|
650
|
+
Je,
|
|
651
651
|
{
|
|
652
652
|
clientId: t,
|
|
653
653
|
resourceTypeScopes: v ?? []
|
|
654
654
|
}
|
|
655
655
|
),
|
|
656
|
-
/* @__PURE__ */ e(
|
|
656
|
+
/* @__PURE__ */ e(Me, { resourceType: n }),
|
|
657
657
|
/* @__PURE__ */ e(
|
|
658
|
-
|
|
658
|
+
Qe,
|
|
659
659
|
{
|
|
660
660
|
permissionClientId: t,
|
|
661
661
|
providers: P,
|
|
662
662
|
policies: m,
|
|
663
|
-
resourceType:
|
|
663
|
+
resourceType: n
|
|
664
664
|
}
|
|
665
665
|
)
|
|
666
666
|
] }),
|
|
@@ -681,10 +681,10 @@ function oi() {
|
|
|
681
681
|
variant: "link",
|
|
682
682
|
"data-testid": "cancel",
|
|
683
683
|
component: (s) => /* @__PURE__ */ e(
|
|
684
|
-
|
|
684
|
+
Ge,
|
|
685
685
|
{
|
|
686
686
|
...s,
|
|
687
|
-
to:
|
|
687
|
+
to: J({
|
|
688
688
|
realm: w,
|
|
689
689
|
permissionClientId: t,
|
|
690
690
|
tab: "permissions"
|
|
@@ -699,6 +699,6 @@ function oi() {
|
|
|
699
699
|
] }) : /* @__PURE__ */ e(Ke, {});
|
|
700
700
|
}
|
|
701
701
|
export {
|
|
702
|
-
|
|
702
|
+
ni as default
|
|
703
703
|
};
|
|
704
|
-
//# sourceMappingURL=PermissionConfigurationDetails-
|
|
704
|
+
//# sourceMappingURL=PermissionConfigurationDetails-B7AeRfGJ.js.map
|