@gooddata/sdk-ui-ext 11.53.0-alpha.5 → 11.53.0-alpha.7
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/esm/internal/components/dialogs/userManagementDialogs/AddWorkspaceToSubjects.d.ts +1 -0
- package/esm/internal/components/dialogs/userManagementDialogs/AddWorkspaceToSubjects.d.ts.map +1 -1
- package/esm/internal/components/dialogs/userManagementDialogs/AddWorkspaceToSubjects.js +2 -2
- package/esm/internal/components/dialogs/userManagementDialogs/UserEditDialog.d.ts +1 -0
- package/esm/internal/components/dialogs/userManagementDialogs/UserEditDialog.d.ts.map +1 -1
- package/esm/internal/components/dialogs/userManagementDialogs/UserEditDialog.js +2 -2
- package/esm/internal/components/dialogs/userManagementDialogs/UserGroupEditDialog.d.ts +1 -0
- package/esm/internal/components/dialogs/userManagementDialogs/UserGroupEditDialog.d.ts.map +1 -1
- package/esm/internal/components/dialogs/userManagementDialogs/UserGroupEditDialog.js +2 -2
- package/esm/internal/components/dialogs/userManagementDialogs/Workspace/AddSingleWorkspaceSelect.d.ts.map +1 -1
- package/esm/internal/components/dialogs/userManagementDialogs/Workspace/AddSingleWorkspaceSelect.js +1 -3
- package/esm/internal/components/dialogs/userManagementDialogs/Workspace/AddWorkspace.d.ts +2 -1
- package/esm/internal/components/dialogs/userManagementDialogs/Workspace/AddWorkspace.d.ts.map +1 -1
- package/esm/internal/components/dialogs/userManagementDialogs/Workspace/AddWorkspace.js +2 -2
- package/esm/internal/components/dialogs/userManagementDialogs/Workspace/WorkspaceItem/GranularPermissions.d.ts +2 -1
- package/esm/internal/components/dialogs/userManagementDialogs/Workspace/WorkspaceItem/GranularPermissions.d.ts.map +1 -1
- package/esm/internal/components/dialogs/userManagementDialogs/Workspace/WorkspaceItem/GranularPermissions.js +5 -2
- package/esm/internal/components/dialogs/userManagementDialogs/Workspace/WorkspaceItem/granularPermissionUtils.d.ts.map +1 -1
- package/esm/internal/components/dialogs/userManagementDialogs/Workspace/WorkspaceItem/granularPermissionUtils.js +9 -1
- package/esm/internal/components/dialogs/userManagementDialogs/Workspace/WorkspaceItem/locales.d.ts +6 -0
- package/esm/internal/components/dialogs/userManagementDialogs/Workspace/WorkspaceItem/locales.d.ts.map +1 -1
- package/esm/internal/components/dialogs/userManagementDialogs/Workspace/WorkspaceItem/locales.js +4 -0
- package/esm/internal/translations/en-US.localization-bundle.d.ts +8 -0
- package/esm/internal/translations/en-US.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/en-US.localization-bundle.js +8 -0
- package/esm/sdk-ui-ext.d.ts +3 -0
- package/esm/share/ObjectShareDialog.js +6 -4
- package/esm/share/messages.d.ts +11 -0
- package/esm/share/messages.d.ts.map +1 -1
- package/esm/share/messages.js +7 -0
- package/esm/share/objectShareController.types.d.ts +10 -8
- package/esm/share/objectShareController.types.d.ts.map +1 -1
- package/esm/share/useAccessList.d.ts +19 -1
- package/esm/share/useAccessList.d.ts.map +1 -1
- package/esm/share/useAccessList.js +20 -3
- package/esm/share/useObjectShareController.d.ts.map +1 -1
- package/esm/share/useObjectShareController.js +15 -10
- package/esm/share/useObjectShareDialog.d.ts +6 -2
- package/esm/share/useObjectShareDialog.d.ts.map +1 -1
- package/esm/share/useObjectShareDialog.js +33 -6
- package/package.json +21 -21
- package/esm/internal/components/pluggableVisualizations/geoChartNext/geoConfigBuilder.test.d.ts +0 -2
- package/esm/internal/components/pluggableVisualizations/geoChartNext/geoConfigBuilder.test.d.ts.map +0 -1
- package/esm/internal/components/pluggableVisualizations/geoChartNext/geoConfigBuilder.test.js +0 -415
package/esm/internal/components/dialogs/userManagementDialogs/AddWorkspaceToSubjects.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddWorkspaceToSubjects.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/dialogs/userManagementDialogs/AddWorkspaceToSubjects.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,mBAAmB,EAAiB,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAA0B,KAAK,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAMrF;;GAEG;AACH,MAAM,WAAW,4BAA6B,SAAQ,mBAAmB;IACrE,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,WAAW,EAAE,0BAA0B,CAAC;IACxC,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"AddWorkspaceToSubjects.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/dialogs/userManagementDialogs/AddWorkspaceToSubjects.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,mBAAmB,EAAiB,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAA0B,KAAK,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAMrF;;GAEG;AACH,MAAM,WAAW,4BAA6B,SAAQ,mBAAmB;IACrE,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,WAAW,EAAE,0BAA0B,CAAC;IACxC,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACzC;AAkCD;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;CAAiD,CAAC"}
|
|
@@ -6,8 +6,8 @@ import { withTelemetry } from "./TelemetryContext.js";
|
|
|
6
6
|
import { AddWorkspace } from "./Workspace/AddWorkspace.js";
|
|
7
7
|
const alignPoints = [{ align: "cc cc" }];
|
|
8
8
|
const noGrantedWorkspaces = [];
|
|
9
|
-
function AddWorkspaceToSubjectsComponent({ ids, subjectType, organizationId, onSuccess, onClose, }) {
|
|
10
|
-
return (_jsx(OrganizationIdProvider, { organizationId: organizationId, children: _jsx(Overlay, { alignPoints: alignPoints, isModal: true, positionType: "fixed", className: "gd-user-management-dialog", resizeObserverThreshold: 0.2, children: _jsx(AddWorkspace, { ids: ids, subjectType: subjectType, grantedWorkspaces: noGrantedWorkspaces, enableBackButton: false, onSubmit: onSuccess, onCancel: onClose, onClose: onClose }) }) }));
|
|
9
|
+
function AddWorkspaceToSubjectsComponent({ ids, subjectType, organizationId, onSuccess, onClose, areMetricPermissionsEnabled, }) {
|
|
10
|
+
return (_jsx(OrganizationIdProvider, { organizationId: organizationId, children: _jsx(Overlay, { alignPoints: alignPoints, isModal: true, positionType: "fixed", className: "gd-user-management-dialog", resizeObserverThreshold: 0.2, children: _jsx(AddWorkspace, { ids: ids, subjectType: subjectType, grantedWorkspaces: noGrantedWorkspaces, enableBackButton: false, onSubmit: onSuccess, onCancel: onClose, onClose: onClose, areMetricPermissionsEnabled: areMetricPermissionsEnabled }) }) }));
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* @internal
|
|
@@ -14,6 +14,7 @@ export interface IUserEditDialogProps extends IWithTelemetryProps {
|
|
|
14
14
|
onClose: () => void;
|
|
15
15
|
renderDataSourceIcon?: (dataSource: IGrantedDataSource) => ReactElement;
|
|
16
16
|
isSystemAccountFilteringEnabled?: boolean;
|
|
17
|
+
areMetricPermissionsEnabled?: boolean;
|
|
17
18
|
selectedTab?: UserTabId;
|
|
18
19
|
}
|
|
19
20
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserEditDialog.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/dialogs/userManagementDialogs/UserEditDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAqB,MAAM,OAAO,CAAC;AA0B7D,OAAO,EAAE,KAAK,mBAAmB,EAAiB,MAAM,uBAAuB,CAAC;AAChF,OAAO,EACH,KAAK,kBAAkB,EAEvB,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACjB,MAAM,YAAY,CAAC;AAUpB;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC7D,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,oBAAoB,CAAC,EAAE,CAAC,UAAU,EAAE,kBAAkB,KAAK,YAAY,CAAC;IACxE,+BAA+B,CAAC,EAAE,OAAO,CAAC;IAC1C,WAAW,CAAC,EAAE,SAAS,CAAC;CAC3B;
|
|
1
|
+
{"version":3,"file":"UserEditDialog.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/dialogs/userManagementDialogs/UserEditDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAqB,MAAM,OAAO,CAAC;AA0B7D,OAAO,EAAE,KAAK,mBAAmB,EAAiB,MAAM,uBAAuB,CAAC;AAChF,OAAO,EACH,KAAK,kBAAkB,EAEvB,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACjB,MAAM,YAAY,CAAC;AAUpB;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC7D,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,oBAAoB,CAAC,EAAE,CAAC,UAAU,EAAE,kBAAkB,KAAK,YAAY,CAAC;IACxE,+BAA+B,CAAC,EAAE,OAAO,CAAC;IAC1C,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,WAAW,CAAC,EAAE,SAAS,CAAC;CAC3B;AAqRD;;GAEG;AACH,eAAO,MAAM,cAAc;;;CAAyC,CAAC"}
|
|
@@ -23,7 +23,7 @@ import { ViewDialog } from "./ViewDialog.js";
|
|
|
23
23
|
import { AddWorkspace } from "./Workspace/AddWorkspace.js";
|
|
24
24
|
import { WorkspaceList } from "./Workspace/WorkspaceList.js";
|
|
25
25
|
const alignPoints = [{ align: "cc cc" }];
|
|
26
|
-
function UserEditDialogComponent({ userId, organizationId, isAdmin, onSuccess, onClose, initialView = "VIEW", changeUserMembership = false, renderDataSourceIcon, isSystemAccountFilteringEnabled = false, selectedTab = undefined, }) {
|
|
26
|
+
function UserEditDialogComponent({ userId, organizationId, isAdmin, onSuccess, onClose, initialView = "VIEW", changeUserMembership = false, renderDataSourceIcon, isSystemAccountFilteringEnabled = false, areMetricPermissionsEnabled = false, selectedTab = undefined, }) {
|
|
27
27
|
const intl = useIntl();
|
|
28
28
|
const { dialogMode, setDialogMode } = useUserDialogMode(initialView);
|
|
29
29
|
const { user, isCurrentlyAdmin, onUserDetailsChanged, setIsAdmin, error, isLoading: userIsLoading, } = useUser(userId, organizationId, isAdmin, onSuccess);
|
|
@@ -89,7 +89,7 @@ function UserEditDialogComponent({ userId, organizationId, isAdmin, onSuccess, o
|
|
|
89
89
|
_jsx(LoadingComponent, { className: "gd-user-management-dialog-loading" }), _jsx(ErrorDialog, { dialogTitle: "", onClose: onClose })
|
|
90
90
|
] })) : error ? (_jsx(ErrorDialog, { onClose: onClose, dialogTitle: intl.formatMessage(messages.userLoadingErrorTitle), children: _jsx(Message, { type: "error", className: "gd-user-management-dialog-error", children: intl.formatMessage(isUnexpectedResponseError(error) && error.httpStatus === 404
|
|
91
91
|
? messages.userLoadingErrorNotExist
|
|
92
|
-
: messages.userLoadingErrorUnknown) }) })) : (_jsxs(_Fragment, { children: [dialogMode === "VIEW" && (_jsxs(ViewDialog, { dialogTitle: extractUserName(user), isAdmin: isCurrentlyAdmin, isDeleteLinkEnabled: !isBootstrapUser(user), deleteLinkDisabledTooltipTextId: messages.deleteUserDisabledTooltip.id, deleteLinkText: intl.formatMessage(messages.deleteUserLink), onOpenDeleteDialog: onOpenDeleteDialog, onClose: onClose, onEdit: () => setDialogMode(editButtonMode), editButtonText: editButtonText, editButtonIconClassName: editButtonIconClassName, children: [isCurrentlyAdmin ? (_jsx("div", { className: "gd-message information gd-user-management-admin-alert s-admin-message", children: _jsx("div", { className: "gd-message-text", children: intl.formatMessage(messages.adminAlert) }) })) : null, _jsx(Tabs, { selectedTabId: selectedTabId.id, onTabSelect: setSelectedTabId, tabs: tabs, className: "gd-user-management-dialog-tabs s-user-management-tabs" }), selectedTabId.id === userDialogTabsMessages.workspaces.id && (_jsx(WorkspaceList, { workspaces: grantedWorkspaces, subjectType: "user", mode: "VIEW", onDelete: removeGrantedWorkspace, onChange: updateGrantedWorkspace, onClick: handleWorkspaceEdit })), selectedTabId.id === userDialogTabsMessages.userGroups.id && (_jsx(UserGroupsList, { userGroups: grantedUserGroups, mode: "VIEW", onDelete: removeGrantedUserGroup, isBootstrapUser: isBootstrapUser(user), bootstrapUserGroupId: bootstrapUserGroupId })), selectedTabId.id === userDialogTabsMessages.details.id && (_jsx(UserDetailsView, { user: user, isAdmin: isCurrentlyAdmin, isBootstrapUser: isBootstrapUser(user), mode: "VIEW", isSystemAccountFilteringEnabled: isSystemAccountFilteringEnabled })), selectedTabId.id === userDialogTabsMessages.dataSources.id && (_jsx(DataSourceList, { dataSources: grantedDataSources, subjectType: "user", mode: "VIEW", onDelete: removeGrantedDataSource, onChange: updateGrantedDataSource, renderDataSourceIcon: renderDataSourceIcon }))] })), dialogMode === "WORKSPACE" && (_jsx(AddWorkspace, { ids: [userId], subjectType: "user", grantedWorkspaces: grantedWorkspaces, enableBackButton: !isOpenedInEditMode, onSubmit: handleWorkspaceChanged, onCancel: isOpenedInEditMode ? onClose : handleWorkspaceCancel, onClose: onClose, editWorkspace: workspaceToEdit })), dialogMode === "USER_GROUPS" && (_jsx(AddUserGroup, { userIds: [userId], grantedUserGroups: grantedUserGroups, enableBackButton: !isOpenedInEditMode, onSubmit: onUserGroupsChanged, onCancel: isOpenedInEditMode ? onClose : () => setDialogMode("VIEW"), onClose: onClose })), dialogMode === "DATA_SOURCES" && (_jsx(AddDataSource, { ids: [userId], subjectType: "user", grantedDataSources: grantedDataSources, enableBackButton: !isOpenedInEditMode, onSubmit: onDataSourcesChanged, onCancel: isOpenedInEditMode ? onClose : () => setDialogMode("VIEW"), onClose: onClose, renderDataSourceIcon: renderDataSourceIcon })), dialogMode === "DETAIL" && (_jsx(EditUserDetails, { user: user, isAdmin: isCurrentlyAdmin, isBootstrapUser: isBootstrapUser(user), enableBackButton: !isOpenedInEditMode, changeUserMembership: changeUserMembership, isSystemAccountFilteringEnabled: isSystemAccountFilteringEnabled, onSubmit: onUserDetailsChanged, onCancel: isOpenedInEditMode ? onClose : () => setDialogMode("VIEW"), onClose: onClose, removeAdminGroup: removeAdminGroup }))] })) }) })
|
|
92
|
+
: messages.userLoadingErrorUnknown) }) })) : (_jsxs(_Fragment, { children: [dialogMode === "VIEW" && (_jsxs(ViewDialog, { dialogTitle: extractUserName(user), isAdmin: isCurrentlyAdmin, isDeleteLinkEnabled: !isBootstrapUser(user), deleteLinkDisabledTooltipTextId: messages.deleteUserDisabledTooltip.id, deleteLinkText: intl.formatMessage(messages.deleteUserLink), onOpenDeleteDialog: onOpenDeleteDialog, onClose: onClose, onEdit: () => setDialogMode(editButtonMode), editButtonText: editButtonText, editButtonIconClassName: editButtonIconClassName, children: [isCurrentlyAdmin ? (_jsx("div", { className: "gd-message information gd-user-management-admin-alert s-admin-message", children: _jsx("div", { className: "gd-message-text", children: intl.formatMessage(messages.adminAlert) }) })) : null, _jsx(Tabs, { selectedTabId: selectedTabId.id, onTabSelect: setSelectedTabId, tabs: tabs, className: "gd-user-management-dialog-tabs s-user-management-tabs" }), selectedTabId.id === userDialogTabsMessages.workspaces.id && (_jsx(WorkspaceList, { workspaces: grantedWorkspaces, subjectType: "user", mode: "VIEW", onDelete: removeGrantedWorkspace, onChange: updateGrantedWorkspace, onClick: handleWorkspaceEdit })), selectedTabId.id === userDialogTabsMessages.userGroups.id && (_jsx(UserGroupsList, { userGroups: grantedUserGroups, mode: "VIEW", onDelete: removeGrantedUserGroup, isBootstrapUser: isBootstrapUser(user), bootstrapUserGroupId: bootstrapUserGroupId })), selectedTabId.id === userDialogTabsMessages.details.id && (_jsx(UserDetailsView, { user: user, isAdmin: isCurrentlyAdmin, isBootstrapUser: isBootstrapUser(user), mode: "VIEW", isSystemAccountFilteringEnabled: isSystemAccountFilteringEnabled })), selectedTabId.id === userDialogTabsMessages.dataSources.id && (_jsx(DataSourceList, { dataSources: grantedDataSources, subjectType: "user", mode: "VIEW", onDelete: removeGrantedDataSource, onChange: updateGrantedDataSource, renderDataSourceIcon: renderDataSourceIcon }))] })), dialogMode === "WORKSPACE" && (_jsx(AddWorkspace, { ids: [userId], subjectType: "user", grantedWorkspaces: grantedWorkspaces, enableBackButton: !isOpenedInEditMode, onSubmit: handleWorkspaceChanged, onCancel: isOpenedInEditMode ? onClose : handleWorkspaceCancel, onClose: onClose, editWorkspace: workspaceToEdit, areMetricPermissionsEnabled: areMetricPermissionsEnabled })), dialogMode === "USER_GROUPS" && (_jsx(AddUserGroup, { userIds: [userId], grantedUserGroups: grantedUserGroups, enableBackButton: !isOpenedInEditMode, onSubmit: onUserGroupsChanged, onCancel: isOpenedInEditMode ? onClose : () => setDialogMode("VIEW"), onClose: onClose })), dialogMode === "DATA_SOURCES" && (_jsx(AddDataSource, { ids: [userId], subjectType: "user", grantedDataSources: grantedDataSources, enableBackButton: !isOpenedInEditMode, onSubmit: onDataSourcesChanged, onCancel: isOpenedInEditMode ? onClose : () => setDialogMode("VIEW"), onClose: onClose, renderDataSourceIcon: renderDataSourceIcon })), dialogMode === "DETAIL" && (_jsx(EditUserDetails, { user: user, isAdmin: isCurrentlyAdmin, isBootstrapUser: isBootstrapUser(user), enableBackButton: !isOpenedInEditMode, changeUserMembership: changeUserMembership, isSystemAccountFilteringEnabled: isSystemAccountFilteringEnabled, onSubmit: onUserDetailsChanged, onCancel: isOpenedInEditMode ? onClose : () => setDialogMode("VIEW"), onClose: onClose, removeAdminGroup: removeAdminGroup }))] })) }) })
|
|
93
93
|
] }));
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
@@ -12,6 +12,7 @@ export interface IUserGroupEditDialogProps extends IWithTelemetryProps {
|
|
|
12
12
|
onSuccess: () => void;
|
|
13
13
|
onClose: () => void;
|
|
14
14
|
renderDataSourceIcon?: (dataSource: IGrantedDataSource) => ReactElement;
|
|
15
|
+
areMetricPermissionsEnabled?: boolean;
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
18
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserGroupEditDialog.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/dialogs/userManagementDialogs/UserGroupEditDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAqB,MAAM,OAAO,CAAC;AA0B7D,OAAO,EAAE,KAAK,mBAAmB,EAAiB,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,KAAK,kBAAkB,EAA0B,KAAK,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAU3G;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB;IAClE,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,uBAAuB,CAAC;IACtC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,oBAAoB,CAAC,EAAE,CAAC,UAAU,EAAE,kBAAkB,KAAK,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"UserGroupEditDialog.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/dialogs/userManagementDialogs/UserGroupEditDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAqB,MAAM,OAAO,CAAC;AA0B7D,OAAO,EAAE,KAAK,mBAAmB,EAAiB,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,KAAK,kBAAkB,EAA0B,KAAK,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAU3G;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB;IAClE,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,uBAAuB,CAAC;IACtC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,oBAAoB,CAAC,EAAE,CAAC,UAAU,EAAE,kBAAkB,KAAK,YAAY,CAAC;IACxE,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACzC;AA+QD;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;CAA8C,CAAC"}
|
|
@@ -23,7 +23,7 @@ import { ViewDialog } from "./ViewDialog.js";
|
|
|
23
23
|
import { AddWorkspace } from "./Workspace/AddWorkspace.js";
|
|
24
24
|
import { WorkspaceList } from "./Workspace/WorkspaceList.js";
|
|
25
25
|
const alignPoints = [{ align: "cc cc" }];
|
|
26
|
-
function UserGroupEditDialogComponent({ userGroupId, organizationId, isAdmin, onSuccess, onClose, initialView = "VIEW", renderDataSourceIcon, }) {
|
|
26
|
+
function UserGroupEditDialogComponent({ userGroupId, organizationId, isAdmin, onSuccess, onClose, initialView = "VIEW", renderDataSourceIcon, areMetricPermissionsEnabled = false, }) {
|
|
27
27
|
const intl = useIntl();
|
|
28
28
|
const { dialogMode, setDialogMode } = useUserGroupDialogMode(initialView);
|
|
29
29
|
const { userGroup, onUserGroupDetailsChanged, error, isLoading: userGroupIsLoading, } = useUserGroup(userGroupId, organizationId, onSuccess);
|
|
@@ -89,7 +89,7 @@ function UserGroupEditDialogComponent({ userGroupId, organizationId, isAdmin, on
|
|
|
89
89
|
? messages.userGroupLoadingErrorNotExist
|
|
90
90
|
: messages.userGroupLoadingErrorUnknown) }) })) : (_jsxs(_Fragment, { children: [dialogMode === "VIEW" && (_jsxs(ViewDialog, { dialogTitle: extractUserGroupName(userGroup), isAdmin: isAdmin, isDeleteLinkEnabled: !isBootstrapUserGroup(userGroup) && grantedUsers?.length === 0, deleteLinkDisabledTooltipTextId: isBootstrapUserGroup(userGroup)
|
|
91
91
|
? messages.deleteAdminUserGroupTooltip.id
|
|
92
|
-
: messages.deleteNonEmptyUserGroupTooltip.id, deleteLinkText: intl.formatMessage(messages.deleteUserGroupLink), onOpenDeleteDialog: onOpenDeleteDialog, onClose: onClose, onEdit: () => setDialogMode(editButtonMode), editButtonText: editButtonText, editButtonIconClassName: editButtonIconClassName, children: [isAdmin ? (_jsx("div", { className: "gd-message information gd-user-management-admin-alert s-admin-message", children: _jsx("div", { className: "gd-message-text", children: intl.formatMessage(messages.adminGroupAlert) }) })) : null, _jsx(Tabs, { selectedTabId: selectedTabId.id, onTabSelect: setSelectedTabId, tabs: tabs, className: "gd-user-management-dialog-tabs s-user-management-tabs" }), selectedTabId.id === userGroupDialogTabsMessages.workspaces.id && (_jsx(WorkspaceList, { workspaces: grantedWorkspaces, subjectType: "userGroup", mode: "VIEW", onDelete: removeGrantedWorkspace, onChange: updateGrantedWorkspace, onClick: handleWorkspaceEdit })), selectedTabId.id === userGroupDialogTabsMessages.dataSources.id && (_jsx(DataSourceList, { dataSources: grantedDataSources, subjectType: "userGroup", mode: "VIEW", onDelete: removeGrantedDataSource, onChange: updateGrantedDataSource, renderDataSourceIcon: renderDataSourceIcon })), selectedTabId.id === userGroupDialogTabsMessages.users.id && (_jsx(UsersList, { users: grantedUsers, mode: "VIEW", onDelete: removeGrantedUsers, isBootstrapUserGroup: isBootstrapUserGroup(userGroup), bootstrapUserId: bootstrapUserId })), selectedTabId.id === userGroupDialogTabsMessages.details.id && (_jsx(UserGroupDetailsView, { userGroup: userGroup, mode: "VIEW" }))] })), dialogMode === "WORKSPACE" && (_jsx(AddWorkspace, { ids: [userGroupId], subjectType: "userGroup", grantedWorkspaces: grantedWorkspaces, enableBackButton: !isOpenedInEditMode, onSubmit: handleWorkspaceChanged, onCancel: isOpenedInEditMode ? onClose : handleWorkspaceCancel, onClose: onClose, editWorkspace: workspaceToEdit })), dialogMode === "USERS" && (_jsx(AddUser, { userGroupIds: [userGroupId], grantedUsers: grantedUsers, enableBackButton: !isOpenedInEditMode, onSubmit: onUsersChanged, onCancel: isOpenedInEditMode ? onClose : () => setDialogMode("VIEW"), onClose: onClose })), dialogMode === "DATA_SOURCES" && (_jsx(AddDataSource, { ids: [userGroupId], subjectType: "userGroup", grantedDataSources: grantedDataSources, enableBackButton: !isOpenedInEditMode, onSubmit: onDataSourcesChanged, onCancel: isOpenedInEditMode ? onClose : () => setDialogMode("VIEW"), onClose: onClose, renderDataSourceIcon: renderDataSourceIcon })), dialogMode === "DETAIL" && (_jsx(EditUserGroupDetails, { userGroup: userGroup, enableBackButton: !isOpenedInEditMode, onSubmit: onUserGroupDetailsChanged, onCancel: isOpenedInEditMode ? onClose : () => setDialogMode("VIEW"), onClose: onClose }))] })) }) })
|
|
92
|
+
: messages.deleteNonEmptyUserGroupTooltip.id, deleteLinkText: intl.formatMessage(messages.deleteUserGroupLink), onOpenDeleteDialog: onOpenDeleteDialog, onClose: onClose, onEdit: () => setDialogMode(editButtonMode), editButtonText: editButtonText, editButtonIconClassName: editButtonIconClassName, children: [isAdmin ? (_jsx("div", { className: "gd-message information gd-user-management-admin-alert s-admin-message", children: _jsx("div", { className: "gd-message-text", children: intl.formatMessage(messages.adminGroupAlert) }) })) : null, _jsx(Tabs, { selectedTabId: selectedTabId.id, onTabSelect: setSelectedTabId, tabs: tabs, className: "gd-user-management-dialog-tabs s-user-management-tabs" }), selectedTabId.id === userGroupDialogTabsMessages.workspaces.id && (_jsx(WorkspaceList, { workspaces: grantedWorkspaces, subjectType: "userGroup", mode: "VIEW", onDelete: removeGrantedWorkspace, onChange: updateGrantedWorkspace, onClick: handleWorkspaceEdit })), selectedTabId.id === userGroupDialogTabsMessages.dataSources.id && (_jsx(DataSourceList, { dataSources: grantedDataSources, subjectType: "userGroup", mode: "VIEW", onDelete: removeGrantedDataSource, onChange: updateGrantedDataSource, renderDataSourceIcon: renderDataSourceIcon })), selectedTabId.id === userGroupDialogTabsMessages.users.id && (_jsx(UsersList, { users: grantedUsers, mode: "VIEW", onDelete: removeGrantedUsers, isBootstrapUserGroup: isBootstrapUserGroup(userGroup), bootstrapUserId: bootstrapUserId })), selectedTabId.id === userGroupDialogTabsMessages.details.id && (_jsx(UserGroupDetailsView, { userGroup: userGroup, mode: "VIEW" }))] })), dialogMode === "WORKSPACE" && (_jsx(AddWorkspace, { ids: [userGroupId], subjectType: "userGroup", grantedWorkspaces: grantedWorkspaces, enableBackButton: !isOpenedInEditMode, onSubmit: handleWorkspaceChanged, onCancel: isOpenedInEditMode ? onClose : handleWorkspaceCancel, onClose: onClose, editWorkspace: workspaceToEdit, areMetricPermissionsEnabled: areMetricPermissionsEnabled })), dialogMode === "USERS" && (_jsx(AddUser, { userGroupIds: [userGroupId], grantedUsers: grantedUsers, enableBackButton: !isOpenedInEditMode, onSubmit: onUsersChanged, onCancel: isOpenedInEditMode ? onClose : () => setDialogMode("VIEW"), onClose: onClose })), dialogMode === "DATA_SOURCES" && (_jsx(AddDataSource, { ids: [userGroupId], subjectType: "userGroup", grantedDataSources: grantedDataSources, enableBackButton: !isOpenedInEditMode, onSubmit: onDataSourcesChanged, onCancel: isOpenedInEditMode ? onClose : () => setDialogMode("VIEW"), onClose: onClose, renderDataSourceIcon: renderDataSourceIcon })), dialogMode === "DETAIL" && (_jsx(EditUserGroupDetails, { userGroup: userGroup, enableBackButton: !isOpenedInEditMode, onSubmit: onUserGroupDetailsChanged, onCancel: isOpenedInEditMode ? onClose : () => setDialogMode("VIEW"), onClose: onClose }))] })) }) })
|
|
93
93
|
] }));
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddSingleWorkspaceSelect.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/components/dialogs/userManagementDialogs/Workspace/AddSingleWorkspaceSelect.tsx"],"names":[],"mappings":"AAYA,OAAO,EACH,KAAK,8BAA8B,EAKtC,MAAM,aAAa,CAAC;AAgBrB,wBAAgB,wBAAwB,CAAC,EACrC,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,IAAa,EAChB,EAAE,8BAA8B,
|
|
1
|
+
{"version":3,"file":"AddSingleWorkspaceSelect.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/components/dialogs/userManagementDialogs/Workspace/AddSingleWorkspaceSelect.tsx"],"names":[],"mappings":"AAYA,OAAO,EACH,KAAK,8BAA8B,EAKtC,MAAM,aAAa,CAAC;AAgBrB,wBAAgB,wBAAwB,CAAC,EACrC,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,IAAa,EAChB,EAAE,8BAA8B,2CA0GhC"}
|
package/esm/internal/components/dialogs/userManagementDialogs/Workspace/AddSingleWorkspaceSelect.js
CHANGED
|
@@ -63,9 +63,7 @@ export function AddSingleWorkspaceSelect({ addedWorkspace, grantedWorkspaces, on
|
|
|
63
63
|
}, styles: {
|
|
64
64
|
dropdownIndicator: (base) => ({
|
|
65
65
|
...base,
|
|
66
|
-
|
|
67
|
-
marginRight: "-6px",
|
|
68
|
-
svg: { height: "14px" },
|
|
66
|
+
svg: { width: "14px", height: "14px" },
|
|
69
67
|
}),
|
|
70
68
|
}, loadOptions: loadOptions, defaultOptions: true, placeholder: intl.formatMessage(messages.searchWorkspacePlaceholder), onKeyDown: onKeyDownCallback, noOptionsMessage: noOptionsMessage, onChange: onSelect, filterOption: filterOption, isMulti: false, isDisabled: !isEditMode, value: addedWorkspace
|
|
71
69
|
? {
|
|
@@ -8,6 +8,7 @@ export interface IAddWorkspaceProps {
|
|
|
8
8
|
onCancel: () => void;
|
|
9
9
|
onClose: () => void;
|
|
10
10
|
editWorkspace?: IGrantedWorkspace;
|
|
11
|
+
areMetricPermissionsEnabled?: boolean;
|
|
11
12
|
}
|
|
12
|
-
export declare function AddWorkspace({ ids, subjectType, grantedWorkspaces, enableBackButton, onSubmit, onCancel, onClose, editWorkspace }: IAddWorkspaceProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function AddWorkspace({ ids, subjectType, grantedWorkspaces, enableBackButton, onSubmit, onCancel, onClose, editWorkspace, areMetricPermissionsEnabled }: IAddWorkspaceProps): import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
//# sourceMappingURL=AddWorkspace.d.ts.map
|
package/esm/internal/components/dialogs/userManagementDialogs/Workspace/AddWorkspace.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddWorkspace.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/components/dialogs/userManagementDialogs/Workspace/AddWorkspace.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAUtF,MAAM,WAAW,kBAAkB;IAC/B,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,WAAW,EAAE,0BAA0B,CAAC;IACxC,iBAAiB,EAAE,iBAAiB,EAAE,GAAG,SAAS,CAAC;IACnD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,EAAE,CAAC,UAAU,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAC;IACpD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"AddWorkspace.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/components/dialogs/userManagementDialogs/Workspace/AddWorkspace.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAUtF,MAAM,WAAW,kBAAkB;IAC/B,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,WAAW,EAAE,0BAA0B,CAAC;IACxC,iBAAiB,EAAE,iBAAiB,EAAE,GAAG,SAAS,CAAC;IACnD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,EAAE,CAAC,UAAU,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAC;IACpD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACzC;AAED,wBAAgB,YAAY,CAAC,EACzB,GAAG,EACH,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,aAAa,EACb,2BAA2B,EAC9B,EAAE,kBAAkB,2CAoEpB"}
|
|
@@ -8,7 +8,7 @@ import { AddSingleWorkspaceSelect } from "./AddSingleWorkspaceSelect.js";
|
|
|
8
8
|
import { useAddWorkspace } from "./useAddWorkspace.js";
|
|
9
9
|
import { GranularPermissions } from "./WorkspaceItem/GranularPermissions.js";
|
|
10
10
|
import { areRedundantPermissionsPresent, areWorkspacePermissionsEqual, } from "./WorkspaceItem/granularPermissionUtils.js";
|
|
11
|
-
export function AddWorkspace({ ids, subjectType, grantedWorkspaces, enableBackButton, onSubmit, onCancel, onClose, editWorkspace, }) {
|
|
11
|
+
export function AddWorkspace({ ids, subjectType, grantedWorkspaces, enableBackButton, onSubmit, onCancel, onClose, editWorkspace, areMetricPermissionsEnabled, }) {
|
|
12
12
|
const intl = useIntl();
|
|
13
13
|
const { addedWorkspaces, isProcessing, onAdd, onChange, onOverwriteSelect } = useAddWorkspace(ids, subjectType, onSubmit, onCancel, editWorkspace);
|
|
14
14
|
const isGranularPermissionsChanged = useMemo(() => {
|
|
@@ -26,6 +26,6 @@ export function AddWorkspace({ ids, subjectType, grantedWorkspaces, enableBackBu
|
|
|
26
26
|
}), href: "https://www.gooddata.com/docs/cloud/manage-organization/manage-permissions/set-permissions-for-workspace/", iconClass: "gd-icon-circle-question" }) }));
|
|
27
27
|
}, [intl]);
|
|
28
28
|
return (_jsxs(ConfirmDialogBase, { className: "gd-share-dialog gd-share-dialog-add-workspace s-user-management-add-workspace", displayCloseButton: true, isPositive: true, isSubmitDisabled: addedWorkspaces.length === 0 || isProcessing || !isGranularPermissionsChanged, showProgressIndicator: isProcessing, headline: intl.formatMessage(editWorkspace ? messages.editWorkspaceDialogTitle : messages.addWorkspaceDialogTitle), cancelButtonText: intl.formatMessage(messages.addWorkspaceDialogCloseButton), submitButtonText: intl.formatMessage(messages.addWorkspaceDialogSaveButton), onCancel: onCancel, onSubmit: onAdd, onClose: onClose, headerLeftButtonRenderer: enableBackButton ? backButtonRenderer : undefined, footerLeftRenderer: leftFooterRenderer, children: [
|
|
29
|
-
_jsx(AddSingleWorkspaceSelect, { addedWorkspace: addedWorkspaces[0], grantedWorkspaces: grantedWorkspaces, onSelectWorkspace: onOverwriteSelect, mode: editWorkspace ? "VIEW" : "EDIT" }), _jsx(GranularPermissions, { workspace: addedWorkspaces[0], onChange: onChange, showRedundancyWarningMessage: showRedundancyWarningMessage })
|
|
29
|
+
_jsx(AddSingleWorkspaceSelect, { addedWorkspace: addedWorkspaces[0], grantedWorkspaces: grantedWorkspaces, onSelectWorkspace: onOverwriteSelect, mode: editWorkspace ? "VIEW" : "EDIT" }), _jsx(GranularPermissions, { workspace: addedWorkspaces[0], onChange: onChange, showRedundancyWarningMessage: showRedundancyWarningMessage, areMetricPermissionsEnabled: areMetricPermissionsEnabled })
|
|
30
30
|
] }));
|
|
31
31
|
}
|
|
@@ -3,7 +3,8 @@ interface IGranularPermissionsProps {
|
|
|
3
3
|
workspace: IGrantedWorkspace | undefined;
|
|
4
4
|
onChange: (workspace: IGrantedWorkspace) => void;
|
|
5
5
|
showRedundancyWarningMessage: boolean;
|
|
6
|
+
areMetricPermissionsEnabled?: boolean;
|
|
6
7
|
}
|
|
7
|
-
export declare function GranularPermissions({ workspace, onChange, showRedundancyWarningMessage }: IGranularPermissionsProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function GranularPermissions({ workspace, onChange, showRedundancyWarningMessage, areMetricPermissionsEnabled }: IGranularPermissionsProps): import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
9
10
|
//# sourceMappingURL=GranularPermissions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GranularPermissions.d.ts","sourceRoot":"","sources":["../../../../../../../src/internal/components/dialogs/userManagementDialogs/Workspace/WorkspaceItem/GranularPermissions.tsx"],"names":[],"mappings":"AAQA,OAAO,EACH,KAAK,iBAAiB,EAIzB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"GranularPermissions.d.ts","sourceRoot":"","sources":["../../../../../../../src/internal/components/dialogs/userManagementDialogs/Workspace/WorkspaceItem/GranularPermissions.tsx"],"names":[],"mappings":"AAQA,OAAO,EACH,KAAK,iBAAiB,EAIzB,MAAM,gBAAgB,CAAC;AA0BxB,UAAU,yBAAyB;IAC/B,SAAS,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACzC,QAAQ,EAAE,CAAC,SAAS,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACjD,4BAA4B,EAAE,OAAO,CAAC;IACtC,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACzC;AAED,wBAAgB,mBAAmB,CAAC,EAChC,SAAS,EACT,QAAQ,EACR,4BAA4B,EAC5B,2BAAmC,EACtC,EAAE,yBAAyB,2CA2I3B"}
|
|
@@ -13,14 +13,17 @@ const granularPermissions = [
|
|
|
13
13
|
{ id: "EXPORT", enabled: true },
|
|
14
14
|
{ id: "EXPORT_PDF", enabled: true, group: true },
|
|
15
15
|
{ id: "EXPORT_TABULAR", enabled: true, group: true },
|
|
16
|
+
{ id: "CREATE_METRIC", enabled: true },
|
|
16
17
|
{ id: "CREATE_FILTER_VIEW", enabled: true },
|
|
17
18
|
];
|
|
18
|
-
export function GranularPermissions({ workspace, onChange, showRedundancyWarningMessage, }) {
|
|
19
|
+
export function GranularPermissions({ workspace, onChange, showRedundancyWarningMessage, areMetricPermissionsEnabled = false, }) {
|
|
19
20
|
const intl = useIntl();
|
|
20
21
|
const { permissions: selectedPermissions = [], isHierarchical = false } = workspace ?? {};
|
|
21
22
|
const selectedWorkspacePermission = getWorkspacePermission(selectedPermissions);
|
|
22
23
|
const selectedGranularPermissions = getGranularPermissions(selectedPermissions);
|
|
23
|
-
const granularItems =
|
|
24
|
+
const granularItems = areMetricPermissionsEnabled
|
|
25
|
+
? granularPermissions
|
|
26
|
+
: granularPermissions.filter(({ id }) => id !== "CREATE_METRIC");
|
|
24
27
|
const handleChange = useCallback((permissions, isHierarchical) => {
|
|
25
28
|
const sanitizedPermissions = removeRedundantPermissions(permissions);
|
|
26
29
|
onChange({ ...workspace, permissions: sanitizedPermissions, isHierarchical });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"granularPermissionUtils.d.ts","sourceRoot":"","sources":["../../../../../../../src/internal/components/dialogs/userManagementDialogs/Workspace/WorkspaceItem/granularPermissionUtils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,mBAAmB,EAAE,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAI7G,eAAO,MAAM,oBAAoB,EAAE,oBAAoD,CAAC;AAExF,eAAO,MAAM,iBAAiB,EAAE,oBAA0D,CAAC;AAE3F;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B,
|
|
1
|
+
{"version":3,"file":"granularPermissionUtils.d.ts","sourceRoot":"","sources":["../../../../../../../src/internal/components/dialogs/userManagementDialogs/Workspace/WorkspaceItem/granularPermissionUtils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,mBAAmB,EAAE,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAI7G,eAAO,MAAM,oBAAoB,EAAE,oBAAoD,CAAC;AAExF,eAAO,MAAM,iBAAiB,EAAE,oBAA0D,CAAC;AAE3F;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B,oEAoB1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,4DAQlC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,6DAWlC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,uHA+BrC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,iGASxC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,mJAYhC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,6DAuBtC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,2EAYxC,CAAC;AAmCF;;GAEG;AACH,eAAO,MAAM,gCAAgC,gEAsB5C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,gDAG1C,CAAC"}
|
|
@@ -17,7 +17,14 @@ export const getImplicitGranularPermissions = (workspacePermission) => {
|
|
|
17
17
|
case "ANALYZE":
|
|
18
18
|
return ["CREATE_FILTER_VIEW"];
|
|
19
19
|
case "MANAGE":
|
|
20
|
-
return [
|
|
20
|
+
return [
|
|
21
|
+
"EXPORT",
|
|
22
|
+
"EXPORT_PDF",
|
|
23
|
+
"EXPORT_TABULAR",
|
|
24
|
+
"CREATE_AUTOMATION",
|
|
25
|
+
"CREATE_METRIC",
|
|
26
|
+
"CREATE_FILTER_VIEW",
|
|
27
|
+
];
|
|
21
28
|
default:
|
|
22
29
|
return [];
|
|
23
30
|
}
|
|
@@ -149,6 +156,7 @@ const reorderPermissions = (permissions) => {
|
|
|
149
156
|
"VIEW",
|
|
150
157
|
"CREATE_FILTER_VIEW",
|
|
151
158
|
"CREATE_AUTOMATION",
|
|
159
|
+
"CREATE_METRIC",
|
|
152
160
|
"EXPORT",
|
|
153
161
|
"EXPORT_PDF",
|
|
154
162
|
"EXPORT_TABULAR",
|
package/esm/internal/components/dialogs/userManagementDialogs/Workspace/WorkspaceItem/locales.d.ts
CHANGED
|
@@ -61,6 +61,9 @@ export declare const workspaceGranularPermissionMessages: {
|
|
|
61
61
|
CREATE_AUTOMATION: {
|
|
62
62
|
id: string;
|
|
63
63
|
};
|
|
64
|
+
CREATE_METRIC: {
|
|
65
|
+
id: string;
|
|
66
|
+
};
|
|
64
67
|
USE_AI_ASSISTANT: {
|
|
65
68
|
id: string;
|
|
66
69
|
};
|
|
@@ -105,6 +108,9 @@ export declare const granularTooltipMessages: {
|
|
|
105
108
|
CREATE_AUTOMATION: {
|
|
106
109
|
id: string;
|
|
107
110
|
};
|
|
111
|
+
CREATE_METRIC: {
|
|
112
|
+
id: string;
|
|
113
|
+
};
|
|
108
114
|
USE_AI_ASSISTANT: {
|
|
109
115
|
id: string;
|
|
110
116
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../../../../src/internal/components/dialogs/userManagementDialogs/Workspace/WorkspaceItem/locales.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAErF,eAAO,MAAM,8BAA8B;;;;;;;CAGzC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;CAStC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;CAmB9B,CAAC;AAEF,eAAO,MAAM,mCAAmC
|
|
1
|
+
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../../../../src/internal/components/dialogs/userManagementDialogs/Workspace/WorkspaceItem/locales.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAErF,eAAO,MAAM,8BAA8B;;;;;;;CAGzC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;CAStC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;CAmB9B,CAAC;AAEF,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmB9C,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;CAQlC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;CAyBtC,CAAC;AAEF,eAAO,MAAM,gCAAgC;;CAQ5C,CAAC;AAEF,eAAO,MAAM,uCAAuC;;CAWnD,CAAC"}
|
package/esm/internal/components/dialogs/userManagementDialogs/Workspace/WorkspaceItem/locales.js
CHANGED
|
@@ -43,6 +43,7 @@ export const workspaceGranularPermissionMessages = defineMessages({
|
|
|
43
43
|
EXPORT_PDF: { id: "userManagement.workspace.permission.exportPdf" },
|
|
44
44
|
CREATE_FILTER_VIEW: { id: "userManagement.workspace.permission.createFilterView" },
|
|
45
45
|
CREATE_AUTOMATION: { id: "userManagement.workspace.permission.createAutomation" },
|
|
46
|
+
CREATE_METRIC: { id: "userManagement.workspace.permission.createMetric" },
|
|
46
47
|
USE_AI_ASSISTANT: { id: "userManagement.workspace.permission.useAiAssistant" },
|
|
47
48
|
viewDescription: { id: "userManagement.workspace.granularPermission.view.description" },
|
|
48
49
|
analyzeDescription: { id: "userManagement.workspace.granularPermission.analyze.description" },
|
|
@@ -59,6 +60,7 @@ export const granularTooltipMessages = defineMessages({
|
|
|
59
60
|
EXPORT_PDF: { id: "userManagement.workspace.permission.exportPdf.tooltip" },
|
|
60
61
|
CREATE_FILTER_VIEW: { id: "userManagement.workspace.permission.createFilterView.tooltip" },
|
|
61
62
|
CREATE_AUTOMATION: { id: "userManagement.workspace.permission.createAutomation.tooltip" },
|
|
63
|
+
CREATE_METRIC: { id: "userManagement.workspace.permission.createMetric.tooltip" },
|
|
62
64
|
USE_AI_ASSISTANT: { id: "userManagement.workspace.permission.useAiAssistant.tooltip" },
|
|
63
65
|
});
|
|
64
66
|
export const getGranularPermissionTitle = (permission) => {
|
|
@@ -79,6 +81,8 @@ export const getGranularPermissionTitle = (permission) => {
|
|
|
79
81
|
return workspaceGranularPermissionMessages.VIEW;
|
|
80
82
|
case "CREATE_AUTOMATION":
|
|
81
83
|
return workspaceGranularPermissionMessages.CREATE_AUTOMATION;
|
|
84
|
+
case "CREATE_METRIC":
|
|
85
|
+
return workspaceGranularPermissionMessages.CREATE_METRIC;
|
|
82
86
|
case "USE_AI_ASSISTANT":
|
|
83
87
|
return workspaceGranularPermissionMessages.USE_AI_ASSISTANT;
|
|
84
88
|
default:
|
|
@@ -2519,6 +2519,10 @@ export declare const en_US: {
|
|
|
2519
2519
|
text: string;
|
|
2520
2520
|
crowdinContext: string;
|
|
2521
2521
|
};
|
|
2522
|
+
"objectShare.granteeLevel.inheritedCovered": {
|
|
2523
|
+
text: string;
|
|
2524
|
+
crowdinContext: string;
|
|
2525
|
+
};
|
|
2522
2526
|
"objectShare.grantee.you": {
|
|
2523
2527
|
text: string;
|
|
2524
2528
|
crowdinContext: string;
|
|
@@ -2547,6 +2551,10 @@ export declare const en_US: {
|
|
|
2547
2551
|
text: string;
|
|
2548
2552
|
crowdinContext: string;
|
|
2549
2553
|
};
|
|
2554
|
+
"objectShare.toast.escalationRefused": {
|
|
2555
|
+
text: string;
|
|
2556
|
+
crowdinContext: string;
|
|
2557
|
+
};
|
|
2550
2558
|
"objectShare.toast.labelScopePartial": {
|
|
2551
2559
|
text: string;
|
|
2552
2560
|
crowdinContext: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en-US.localization-bundle.d.ts","sourceRoot":"","sources":["../../../src/internal/translations/en-US.localization-bundle.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"en-US.localization-bundle.d.ts","sourceRoot":"","sources":["../../../src/internal/translations/en-US.localization-bundle.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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parent workspace and cannot be removed here.",
|
|
2522
2522
|
"crowdinContext": "Tooltip on the disabled Remove access action in a grantee row's permission menu, shown when the grantee has no permission granted in this workspace, so there is nothing here to remove."
|
|
2523
2523
|
},
|
|
2524
|
+
"objectShare.granteeLevel.inheritedCovered": {
|
|
2525
|
+
"text": "This level is already covered by access inherited from a group or a parent workspace.",
|
|
2526
|
+
"crowdinContext": "Tooltip on a disabled permission level in a grantee row's menu, shown when an inherited grant already covers that level, so picking it could not change what the grantee can do."
|
|
2527
|
+
},
|
|
2524
2528
|
"objectShare.grantee.you": {
|
|
2525
2529
|
"text": "{name} (you)",
|
|
2526
2530
|
"crowdinContext": "Display name of the signed-in user's own row in the share dialog grantee list. {name} is the user's full name."
|
|
@@ -2549,6 +2553,10 @@ export const en_US = {
|
|
|
2549
2553
|
"text": "Access could not be updated.",
|
|
2550
2554
|
"crowdinContext": "Toast shown when an access change fails."
|
|
2551
2555
|
},
|
|
2556
|
+
"objectShare.toast.escalationRefused": {
|
|
2557
|
+
"text": "You can only grant permissions that you have yourself.",
|
|
2558
|
+
"crowdinContext": "Error toast shown when a permission change was refused because the user tried to grant a higher permission level than they hold themselves."
|
|
2559
|
+
},
|
|
2552
2560
|
"objectShare.toast.labelScopePartial": {
|
|
2553
2561
|
"text": "Some label access could not be saved.",
|
|
2554
2562
|
"crowdinContext": "Warning toast when sharing an attribute succeeded but one or more of its per-label permission writes failed."
|
package/esm/sdk-ui-ext.d.ts
CHANGED
|
@@ -488,6 +488,7 @@ export declare interface IAddWorkspaceToSubjectsProps extends IWithTelemetryProp
|
|
|
488
488
|
organizationId: string;
|
|
489
489
|
onSuccess: () => void;
|
|
490
490
|
onClose: () => void;
|
|
491
|
+
areMetricPermissionsEnabled?: boolean;
|
|
491
492
|
}
|
|
492
493
|
|
|
493
494
|
/**
|
|
@@ -1785,6 +1786,7 @@ export declare interface IUserEditDialogProps extends IWithTelemetryProps {
|
|
|
1785
1786
|
onClose: () => void;
|
|
1786
1787
|
renderDataSourceIcon?: (dataSource: IGrantedDataSource) => ReactElement;
|
|
1787
1788
|
isSystemAccountFilteringEnabled?: boolean;
|
|
1789
|
+
areMetricPermissionsEnabled?: boolean;
|
|
1788
1790
|
selectedTab?: UserTabId;
|
|
1789
1791
|
}
|
|
1790
1792
|
|
|
@@ -1799,6 +1801,7 @@ export declare interface IUserGroupEditDialogProps extends IWithTelemetryProps {
|
|
|
1799
1801
|
onSuccess: () => void;
|
|
1800
1802
|
onClose: () => void;
|
|
1801
1803
|
renderDataSourceIcon?: (dataSource: IGrantedDataSource) => ReactElement;
|
|
1804
|
+
areMetricPermissionsEnabled?: boolean;
|
|
1802
1805
|
}
|
|
1803
1806
|
|
|
1804
1807
|
/**
|
|
@@ -40,7 +40,7 @@ export function ObjectShareDialog(props) {
|
|
|
40
40
|
/** The dialog session — mounted only while open, so its state cannot outlive a close. */
|
|
41
41
|
function ObjectShareDialogSession({ target, objectTitle, onClose, onSummaryChange, labels, labelsLoading, labelsError, }) {
|
|
42
42
|
const intl = useIntl();
|
|
43
|
-
const { state, actions, isShareViewOpen, isAddGranteeOpen, isGeneralAccessConfirmOpen, isSelfRestrictConfirmOpen, isMutable, isLoading, workspaceDisabledLevels, rowDisabledLevels, isRowRemoveDisabled, rowRemoveDisabledTooltip, onClose: closeDialog, onRowPermissionChange, onRowRemove, onSelfRestrictCancel, onSelfRestrictConfirm, } = useObjectShareDialog({
|
|
43
|
+
const { state, actions, isShareViewOpen, isAddGranteeOpen, isGeneralAccessConfirmOpen, isSelfRestrictConfirmOpen, isMutable, isLoading, workspaceDisabledLevels, rowDisabledLevels, rowDisabledLevelTooltips, isRowRemoveDisabled, isRowControlsLocked, rowRemoveDisabledTooltip, onClose: closeDialog, onRowPermissionChange, onRowRemove, onSelfRestrictCancel, onSelfRestrictConfirm, } = useObjectShareDialog({
|
|
44
44
|
target,
|
|
45
45
|
onClose,
|
|
46
46
|
onSummaryChange,
|
|
@@ -81,13 +81,15 @@ function ObjectShareDialogSession({ target, objectTitle, onClose, onSummaryChang
|
|
|
81
81
|
: display.name,
|
|
82
82
|
email: display.email,
|
|
83
83
|
isPending: g.pending !== undefined,
|
|
84
|
-
controls: (_jsx(UiGranteeRowControls, { labels: rowLabelItems(g.id), selectedLabelIds: state.selectedLabelIdsByGrantee[g.id] ?? state.labels.map((l) => l.id), permissionLevel: g.level, effectivePermission: g.effectivePermission, disabledLevels: disabledLevels,
|
|
84
|
+
controls: (_jsx(UiGranteeRowControls, { labels: rowLabelItems(g.id), selectedLabelIds: state.selectedLabelIdsByGrantee[g.id] ?? state.labels.map((l) => l.id), permissionLevel: g.level, effectivePermission: g.effectivePermission, disabledLevels: disabledLevels,
|
|
85
|
+
// Row-wide warning is the self row's; covered picks carry their own.
|
|
86
|
+
disabledTooltip: state.selfManagedGranteeId === g.id
|
|
85
87
|
? intl.formatMessage(objectShareMessages.selfRestrictWarning)
|
|
86
|
-
: undefined, isRemoveDisabled: isRowRemoveDisabled(g), removeDisabledTooltip: rowRemoveDisabledTooltip,
|
|
88
|
+
: undefined, disabledLevelTooltips: rowDisabledLevelTooltips(g), isRemoveDisabled: isRowRemoveDisabled(g), removeDisabledTooltip: rowRemoveDisabledTooltip,
|
|
87
89
|
// Disabled while the row's own write is saving, while mutations are
|
|
88
90
|
// gated (unresolved label scope would orphan real per-label grants),
|
|
89
91
|
// and while a sole row's self identity is unknown.
|
|
90
|
-
isDisabled: g.pending !== undefined || !isMutable ||
|
|
92
|
+
isDisabled: g.pending !== undefined || !isMutable || isRowControlsLocked(g), onLabelsChange: (selectedIds) => {
|
|
91
93
|
void actions.changeGranteeLabels(g.id, selectedIds);
|
|
92
94
|
}, onPermissionChange: (level) => onRowPermissionChange(g, level), onRemoveAccess: () => onRowRemove(g) })),
|
|
93
95
|
};
|
package/esm/share/messages.d.ts
CHANGED
|
@@ -47,6 +47,17 @@ export declare const objectShareMessages: {
|
|
|
47
47
|
granteeRemoveInherited: {
|
|
48
48
|
id: string;
|
|
49
49
|
};
|
|
50
|
+
/** Disabled-level tooltip for picks an inherited grant already covers. */
|
|
51
|
+
granteeLevelInheritedCovered: {
|
|
52
|
+
id: string;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Error toast for a write the backend refused as an escalation. Distinct from the
|
|
56
|
+
* generic failure: the change was rejected on purpose, retrying will not help.
|
|
57
|
+
*/
|
|
58
|
+
toastEscalationRefused: {
|
|
59
|
+
id: string;
|
|
60
|
+
};
|
|
50
61
|
granteeYou: {
|
|
51
62
|
id: string;
|
|
52
63
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/share/messages.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;IAO5B;;;;OAIG;;;;IAEH;;;OAGG;;;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWL,CAAC"}
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/share/messages.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;IAO5B;;;;OAIG;;;;IAEH;;;OAGG;;;;IAEH;;;OAGG;;;;IAEH,0EAA0E;;;;IAE1E;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWL,CAAC"}
|
package/esm/share/messages.js
CHANGED
|
@@ -31,6 +31,13 @@ export const objectShareMessages = defineMessages({
|
|
|
31
31
|
* access is inherited only — there is no grant in this workspace to revoke.
|
|
32
32
|
*/
|
|
33
33
|
granteeRemoveInherited: { id: "objectShare.granteeRemove.inherited" },
|
|
34
|
+
/** Disabled-level tooltip for picks an inherited grant already covers. */
|
|
35
|
+
granteeLevelInheritedCovered: { id: "objectShare.granteeLevel.inheritedCovered" },
|
|
36
|
+
/**
|
|
37
|
+
* Error toast for a write the backend refused as an escalation. Distinct from the
|
|
38
|
+
* generic failure: the change was rejected on purpose, retrying will not help.
|
|
39
|
+
*/
|
|
40
|
+
toastEscalationRefused: { id: "objectShare.toast.escalationRefused" },
|
|
34
41
|
granteeYou: { id: "objectShare.grantee.you" },
|
|
35
42
|
adminTagLabel: { id: "objectShare.adminTag.label" },
|
|
36
43
|
adminTagTooltip: { id: "objectShare.adminTag.tooltip" },
|
|
@@ -90,10 +90,11 @@ export interface IObjectShareControllerState {
|
|
|
90
90
|
summary: IObjectAccessSummary | undefined;
|
|
91
91
|
grantees: IObjectShareGrantee[];
|
|
92
92
|
/**
|
|
93
|
-
* Id of the grantee row whose permission menu manages the signed-in user's
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
93
|
+
* Id of the grantee row whose permission menu manages the signed-in user's OWN
|
|
94
|
+
* access (the "restrict own access" design), whatever else is listed. Consumers
|
|
95
|
+
* gate lowering behind a confirm and disable the levels above the row's own.
|
|
96
|
+
* Undefined for a workspace manager (their access is not this grant) and while
|
|
97
|
+
* their identity is unresolved, which `granteeControlsLocked` covers.
|
|
97
98
|
*/
|
|
98
99
|
selfManagedGranteeId: string | undefined;
|
|
99
100
|
/**
|
|
@@ -110,10 +111,11 @@ export interface IObjectShareControllerState {
|
|
|
110
111
|
*/
|
|
111
112
|
workspaceDisabledLevels: ObjectSharePermissionLevel[] | undefined;
|
|
112
113
|
/**
|
|
113
|
-
* Whether
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
114
|
+
* Whether USER-row controls must stay disabled because no row can be told apart
|
|
115
|
+
* from the caller's own grant yet (profile pending or silently failed) — mutating
|
|
116
|
+
* one then would bypass the self-restriction confirm and can lose access for good.
|
|
117
|
+
* Set however many rows are listed. Group rows are never the caller, and a known
|
|
118
|
+
* workspace manager needs no confirm, so neither sets this.
|
|
117
119
|
*/
|
|
118
120
|
granteeControlsLocked: boolean;
|
|
119
121
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objectShareController.types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AC;IAC/B,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC5D,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,OAAO,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAC1C,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC
|
|
1
|
+
{"version":3,"file":"objectShareController.types.d.ts","sourceRoot":"","sources":["../../src/share/objectShareController.types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAEzG,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,MAAM,0BAA0B,GAAG,wBAAwB,CAAC;AAElE;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IAClC,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAc,SAAQ,qBAAqB;IACxD,EAAE,EAAE,MAAM,CAAC;CACd;AAED;;;;;GAKG;AACH,MAAM,WAAW,mBAAoB,SAAQ,qBAAqB;IAC9D,kFAAkF;IAClF,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,KAAK,EAAE,0BAA0B,CAAC;IAClC;;;;;OAKG;IACH,WAAW,CAAC,EAAE,0BAA0B,CAAC;IACzC;;;;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,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9E;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACnC,KAAK,EAAE,2BAA2B,CAAC;IACnC,OAAO,EAAE,6BAA6B,CAAC;CAC1C;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACnC;;;OAGG;IACH,MAAM,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC7B;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type IObjectPermissionsObject } from "@gooddata/sdk-backend-spi";
|
|
2
2
|
import { type IGranularAccessGrantee } from "@gooddata/sdk-model";
|
|
3
3
|
import { type GoodDataSdkError } from "@gooddata/sdk-ui";
|
|
4
4
|
import { type GeneralAccessValue, type IUiGranteeAsyncOptions } from "@gooddata/sdk-ui-kit";
|
|
@@ -23,8 +23,26 @@ export interface IAccessList {
|
|
|
23
23
|
* way in must not read as grant-independent after locally removing it.
|
|
24
24
|
*/
|
|
25
25
|
seededWithoutSelfGrant: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Whether the SEED's workspace rule was share-capable (SHARE or EDIT, own or
|
|
28
|
+
* inherited). Load-time fact like {@link seededWithoutSelfGrant}: the Admin badge
|
|
29
|
+
* infers how the caller ENTERED, so restricting the rule mid-session must not
|
|
30
|
+
* start reading as admin access.
|
|
31
|
+
*/
|
|
32
|
+
seededRuleShareCapable: boolean;
|
|
26
33
|
/** Signed-in user's identity facts + login id, once the profile resolves. */
|
|
27
34
|
selfIdentity: ISelfIdentity | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Whether the caller manages this workspace (org admins arrive through the same
|
|
37
|
+
* MANAGE permission), or **undefined** while the read is pending or after it failed.
|
|
38
|
+
*
|
|
39
|
+
* Read it in the direction the policy needs. A protective policy (the
|
|
40
|
+
* self-restriction confirm, the row lock) may treat undefined as "not a manager",
|
|
41
|
+
* since a needless confirm is harmless. A restrictive one (a limit on what may be
|
|
42
|
+
* granted) must require an explicit `false`, or a failed read would block a caller
|
|
43
|
+
* the backend would allow.
|
|
44
|
+
*/
|
|
45
|
+
isWorkspaceManager: boolean | undefined;
|
|
28
46
|
/**
|
|
29
47
|
* Whether the profile resolved. Until then a sole grantee row can't be told apart
|
|
30
48
|
* from the caller's own grant, so its `isSelf` is only an unresolved default.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAccessList.d.ts","sourceRoot":"","sources":["../../src/share/useAccessList.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"useAccessList.d.ts","sourceRoot":"","sources":["../../src/share/useAccessList.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,wBAAwB,EAAiC,MAAM,2BAA2B,CAAC;AACzG,OAAO,EACH,KAAK,sBAAsB,EAM9B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,KAAK,gBAAgB,EAKxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,sBAAsB,EAAmB,MAAM,sBAAsB,CAAC;AAU7G,OAAO,EAEH,KAAK,SAAS,EASjB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EACR,2BAA2B,EAC3B,mBAAmB,EACnB,aAAa,EACb,0BAA0B,EAC7B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD;;;;GAIG;AACH,MAAM,WAAW,WAAW;IACxB,oDAAoD;IACpD,OAAO,EAAE,OAAO,CAAC;IACjB,2EAA2E;IAC3E,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC;;;;;;OAMG;IACH,sBAAsB,EAAE,OAAO,CAAC;IAChC;;;;;OAKG;IACH,sBAAsB,EAAE,OAAO,CAAC;IAChC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