+export const openPermissionEditContextMenu = (event: React.MouseEvent<HTMLElement>, link: LinkResource) =>
+ (dispatch: Dispatch, getState: () => RootState) => {
+ if (link) {
+ dispatch<any>(openContextMenu(event, {
+ name: link.name,
+ uuid: link.uuid,
+ kind: link.kind,
+ menuKind: ContextMenuKind.PERMISSION_EDIT,
+ ownerUuid: link.ownerUuid,
+ }));
+ }
+ };
+
+export const openUserContextMenu = (event: React.MouseEvent<HTMLElement>, user: UserResource) =>
+ (dispatch: Dispatch, getState: () => RootState) => {
+ dispatch<any>(openContextMenu(event, {
+ name: '',
+ uuid: user.uuid,
+ ownerUuid: user.ownerUuid,
+ kind: user.kind,
+ menuKind: ContextMenuKind.USER
+ }));
+ };
+
+export const resourceUuidToContextMenuKind = (uuid: string, readonly = false) =>