@webiny/app-aco 6.6.0-alpha.5 → 6.6.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/dialogs/DialogSetPermissions/UsersTeamsSelection/ListItemMeta.js +5 -0
- package/dialogs/DialogSetPermissions/UsersTeamsSelection/ListItemMeta.js.map +1 -1
- package/features/folders/folderModelProvider/FolderModelProvider.js +1 -0
- package/features/folders/folderModelProvider/FolderModelProvider.js.map +1 -1
- package/features/folders/updateFolder/UpdateFolderGqlGateway.js +1 -1
- package/features/folders/updateFolder/UpdateFolderGqlGateway.js.map +1 -1
- package/features/folders/updateFolder/decorators/{UseCaseWithoutInheritedPermissions.d.ts → UseCaseWithoutReadOnlyPermissions.d.ts} +2 -2
- package/features/folders/updateFolder/decorators/{UseCaseWithoutInheritedPermissions.js → UseCaseWithoutReadOnlyPermissions.js} +6 -6
- package/features/folders/updateFolder/decorators/UseCaseWithoutReadOnlyPermissions.js.map +1 -0
- package/features/folders/updateFolder/feature.js +2 -2
- package/features/folders/updateFolder/feature.js.map +1 -1
- package/package.json +16 -16
- package/features/folders/updateFolder/decorators/UseCaseWithoutInheritedPermissions.js.map +0 -1
|
@@ -38,6 +38,11 @@ const ListItemMeta = ({ permission, target, targetsList, onRemoveAccess, onUpdat
|
|
|
38
38
|
disabled = false;
|
|
39
39
|
removePermissionDisabled = true;
|
|
40
40
|
}
|
|
41
|
+
if (permission.plugin) {
|
|
42
|
+
message = "Defined in code and cannot be changed here.";
|
|
43
|
+
disabled = true;
|
|
44
|
+
removePermissionDisabled = true;
|
|
45
|
+
}
|
|
41
46
|
if (identity.id === target.id) {
|
|
42
47
|
message = "You can't change your own permissions.";
|
|
43
48
|
if (permission.inheritedFrom?.startsWith("team:")) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialogs/DialogSetPermissions/UsersTeamsSelection/ListItemMeta.js","sources":["../../../../src/dialogs/DialogSetPermissions/UsersTeamsSelection/ListItemMeta.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport { ReactComponent as More } from \"@webiny/icons/arrow_drop_down.svg\";\nimport { Button, DropdownMenu, Text, Tooltip } from \"@webiny/admin-ui\";\nimport { useSecurity } from \"@webiny/app-admin\";\nimport type { FolderAccessLevel, FolderLevelPermissionsTarget, FolderPermission } from \"~/types.js\";\n\nconst TARGET_LEVELS = [\n {\n id: \"no-access\",\n label: \"No Access\",\n description: \"Cannot view or modify content\"\n },\n {\n id: \"viewer\",\n label: \"Viewer\",\n description: \"Can view content, but not modify it\"\n },\n {\n id: \"editor\",\n label: \"Editor\",\n description: \"Can view and modify content\"\n },\n {\n id: \"owner\",\n label: \"Owner\",\n description: \"Can edit and manage content permissions\"\n }\n];\n\ninterface ListItemMetaProps {\n permission: FolderPermission;\n target: FolderLevelPermissionsTarget;\n targetsList: FolderLevelPermissionsTarget[];\n onRemoveAccess: (params: { permission: FolderPermission }) => void;\n onUpdatePermission: (params: { permission: FolderPermission }) => void;\n}\n\nexport const ListItemMeta = ({\n permission,\n target,\n targetsList,\n onRemoveAccess,\n onUpdatePermission\n}: ListItemMetaProps) => {\n const { identity } = useSecurity();\n\n const currentLevel = useMemo(() => {\n return TARGET_LEVELS.find(level => level.id === permission.level)!;\n }, [permission.level]);\n\n const { isListDisabled, isRemovePermissionDisabled, tooltipMessage } = useMemo(() => {\n let message = null;\n let disabled = false;\n let removePermissionDisabled = false;\n\n if (permission.inheritedFrom?.startsWith(\"parent:\")) {\n message = \"Inherited from parent folder.\";\n disabled = false; // Still allow interaction, just inform user\n removePermissionDisabled = true;\n }\n\n if (identity!.id === target.id) {\n message = \"You can't change your own permissions.\";\n if (permission.inheritedFrom?.startsWith(\"team:\")) {\n const team = targetsList.find(t => t.target === permission.inheritedFrom);\n message += \" Access to this folder is managed by a team\";\n if (team) {\n message += ` (${team.name})`;\n }\n message += \".\";\n }\n disabled = true;\n removePermissionDisabled = true;\n }\n\n return {\n isListDisabled: disabled,\n isRemovePermissionDisabled: removePermissionDisabled,\n tooltipMessage: message\n };\n }, [permission, identity, target, targetsList]);\n\n const handle = useMemo(() => {\n let handle = (\n <Button\n variant={\"ghost\"}\n disabled={!!isListDisabled}\n text={currentLevel.label}\n icon={<More />}\n iconPosition={\"end\"}\n />\n );\n\n if (tooltipMessage) {\n handle = <Tooltip content={tooltipMessage} trigger={handle} />;\n }\n\n return handle;\n }, [tooltipMessage, isListDisabled, currentLevel.label]);\n\n return (\n <DropdownMenu trigger={handle}>\n {TARGET_LEVELS.map(level => (\n <DropdownMenu.CheckboxItem\n key={level.id}\n checked={currentLevel.id === level.id}\n text={\n <div>\n <Text as={\"div\"}>{level.label}</Text>\n <Text as={\"div\"} size={\"sm\"} className={\"text-neutral-strong\"}>\n {level.description}\n </Text>\n </div>\n }\n onClick={() => {\n // Needed to do this with a short delay because of a visual glitch.\n setTimeout(() => {\n onUpdatePermission({\n permission: {\n ...permission,\n level: level.id as FolderAccessLevel\n }\n });\n }, 75);\n }}\n />\n ))}\n <DropdownMenu.Separator />\n <DropdownMenu.Item\n onClick={() => onRemoveAccess({ permission })}\n text={\"Remove permission\"}\n disabled={isRemovePermissionDisabled}\n />\n </DropdownMenu>\n );\n};\n"],"names":["TARGET_LEVELS","ListItemMeta","permission","target","targetsList","onRemoveAccess","onUpdatePermission","identity","useSecurity","currentLevel","useMemo","level","isListDisabled","isRemovePermissionDisabled","tooltipMessage","message","disabled","removePermissionDisabled","team","t","handle","Button","More","Tooltip","DropdownMenu","Text","setTimeout"],"mappings":";;;;AAMA,MAAMA,gBAAgB;IAClB;QACI,IAAI;QACJ,OAAO;QACP,aAAa;IACjB;IACA;QACI,IAAI;QACJ,OAAO;QACP,aAAa;IACjB;IACA;QACI,IAAI;QACJ,OAAO;QACP,aAAa;IACjB;IACA;QACI,IAAI;QACJ,OAAO;QACP,aAAa;IACjB;CACH;AAUM,MAAMC,eAAe,CAAC,EACzBC,UAAU,EACVC,MAAM,EACNC,WAAW,EACXC,cAAc,EACdC,kBAAkB,EACF;IAChB,MAAM,EAAEC,QAAQ,EAAE,GAAGC;IAErB,MAAMC,eAAeC,QAAQ,IAClBV,cAAc,IAAI,CAACW,CAAAA,QAASA,MAAM,EAAE,KAAKT,WAAW,KAAK,GACjE;QAACA,WAAW,KAAK;KAAC;IAErB,MAAM,EAAEU,cAAc,EAAEC,0BAA0B,EAAEC,cAAc,EAAE,GAAGJ,QAAQ;QAC3E,IAAIK,UAAU;QACd,IAAIC,WAAW;QACf,IAAIC,2BAA2B;QAE/B,IAAIf,WAAW,aAAa,EAAE,WAAW,YAAY;YACjDa,UAAU;YACVC,WAAW;YACXC,2BAA2B;QAC/B;QAEA,IAAIV,SAAU,EAAE,KAAKJ,OAAO,EAAE,EAAE;YAC5BY,UAAU;YACV,IAAIb,WAAW,aAAa,EAAE,WAAW,UAAU;gBAC/C,MAAMgB,OAAOd,YAAY,IAAI,CAACe,CAAAA,IAAKA,EAAE,MAAM,KAAKjB,WAAW,aAAa;gBACxEa,WAAW;gBACX,IAAIG,MACAH,WAAW,CAAC,EAAE,EAAEG,KAAK,IAAI,CAAC,CAAC,CAAC;gBAEhCH,WAAW;YACf;YACAC,WAAW;YACXC,2BAA2B;QAC/B;QAEA,OAAO;YACH,gBAAgBD;YAChB,4BAA4BC;YAC5B,gBAAgBF;QACpB;IACJ,GAAG;QAACb;QAAYK;QAAUJ;QAAQC;KAAY;IAE9C,MAAMgB,SAASV,QAAQ;QACnB,IAAIU,SAAS,WAATA,GACA,oBAACC,QAAMA;YACH,SAAS;YACT,UAAU,CAAC,CAACT;YACZ,MAAMH,aAAa,KAAK;YACxB,oBAAM,oBAACa,gBAAIA;YACX,cAAc;;QAItB,IAAIR,gBACAM,SAAS,WAATA,GAAS,oBAACG,SAAOA;YAAC,SAAST;YAAgB,SAASM;;QAGxD,OAAOA;IACX,GAAG;QAACN;QAAgBF;QAAgBH,aAAa,KAAK;KAAC;IAEvD,OAAO,WAAP,GACI,oBAACe,cAAYA;QAAC,SAASJ;OAClBpB,cAAc,GAAG,CAACW,CAAAA,QAAAA,WAAAA,GACf,oBAACa,aAAa,YAAY;YACtB,KAAKb,MAAM,EAAE;YACb,SAASF,aAAa,EAAE,KAAKE,MAAM,EAAE;YACrC,oBACI,oBAAC,2BACG,oBAACc,MAAIA;gBAAC,IAAI;eAAQd,MAAM,KAAK,iBAC7B,oBAACc,MAAIA;gBAAC,IAAI;gBAAO,MAAM;gBAAM,WAAW;eACnCd,MAAM,WAAW;YAI9B,SAAS;gBAELe,WAAW;oBACPpB,mBAAmB;wBACf,YAAY;4BACR,GAAGJ,UAAU;4BACb,OAAOS,MAAM,EAAE;wBACnB;oBACJ;gBACJ,GAAG;YACP;2BAGR,oBAACa,aAAa,SAAS,uBACvB,oBAACA,aAAa,IAAI;QACd,SAAS,IAAMnB,eAAe;gBAAEH;YAAW;QAC3C,MAAM;QACN,UAAUW;;AAI1B"}
|
|
1
|
+
{"version":3,"file":"dialogs/DialogSetPermissions/UsersTeamsSelection/ListItemMeta.js","sources":["../../../../src/dialogs/DialogSetPermissions/UsersTeamsSelection/ListItemMeta.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport { ReactComponent as More } from \"@webiny/icons/arrow_drop_down.svg\";\nimport { Button, DropdownMenu, Text, Tooltip } from \"@webiny/admin-ui\";\nimport { useSecurity } from \"@webiny/app-admin\";\nimport type { FolderAccessLevel, FolderLevelPermissionsTarget, FolderPermission } from \"~/types.js\";\n\nconst TARGET_LEVELS = [\n {\n id: \"no-access\",\n label: \"No Access\",\n description: \"Cannot view or modify content\"\n },\n {\n id: \"viewer\",\n label: \"Viewer\",\n description: \"Can view content, but not modify it\"\n },\n {\n id: \"editor\",\n label: \"Editor\",\n description: \"Can view and modify content\"\n },\n {\n id: \"owner\",\n label: \"Owner\",\n description: \"Can edit and manage content permissions\"\n }\n];\n\ninterface ListItemMetaProps {\n permission: FolderPermission;\n target: FolderLevelPermissionsTarget;\n targetsList: FolderLevelPermissionsTarget[];\n onRemoveAccess: (params: { permission: FolderPermission }) => void;\n onUpdatePermission: (params: { permission: FolderPermission }) => void;\n}\n\nexport const ListItemMeta = ({\n permission,\n target,\n targetsList,\n onRemoveAccess,\n onUpdatePermission\n}: ListItemMetaProps) => {\n const { identity } = useSecurity();\n\n const currentLevel = useMemo(() => {\n return TARGET_LEVELS.find(level => level.id === permission.level)!;\n }, [permission.level]);\n\n const { isListDisabled, isRemovePermissionDisabled, tooltipMessage } = useMemo(() => {\n let message = null;\n let disabled = false;\n let removePermissionDisabled = false;\n\n if (permission.inheritedFrom?.startsWith(\"parent:\")) {\n message = \"Inherited from parent folder.\";\n disabled = false; // Still allow interaction, just inform user\n removePermissionDisabled = true;\n }\n\n if (permission.plugin) {\n message = \"Defined in code and cannot be changed here.\";\n disabled = true;\n removePermissionDisabled = true;\n }\n\n if (identity!.id === target.id) {\n message = \"You can't change your own permissions.\";\n if (permission.inheritedFrom?.startsWith(\"team:\")) {\n const team = targetsList.find(t => t.target === permission.inheritedFrom);\n message += \" Access to this folder is managed by a team\";\n if (team) {\n message += ` (${team.name})`;\n }\n message += \".\";\n }\n disabled = true;\n removePermissionDisabled = true;\n }\n\n return {\n isListDisabled: disabled,\n isRemovePermissionDisabled: removePermissionDisabled,\n tooltipMessage: message\n };\n }, [permission, identity, target, targetsList]);\n\n const handle = useMemo(() => {\n let handle = (\n <Button\n variant={\"ghost\"}\n disabled={!!isListDisabled}\n text={currentLevel.label}\n icon={<More />}\n iconPosition={\"end\"}\n />\n );\n\n if (tooltipMessage) {\n handle = <Tooltip content={tooltipMessage} trigger={handle} />;\n }\n\n return handle;\n }, [tooltipMessage, isListDisabled, currentLevel.label]);\n\n return (\n <DropdownMenu trigger={handle}>\n {TARGET_LEVELS.map(level => (\n <DropdownMenu.CheckboxItem\n key={level.id}\n checked={currentLevel.id === level.id}\n text={\n <div>\n <Text as={\"div\"}>{level.label}</Text>\n <Text as={\"div\"} size={\"sm\"} className={\"text-neutral-strong\"}>\n {level.description}\n </Text>\n </div>\n }\n onClick={() => {\n // Needed to do this with a short delay because of a visual glitch.\n setTimeout(() => {\n onUpdatePermission({\n permission: {\n ...permission,\n level: level.id as FolderAccessLevel\n }\n });\n }, 75);\n }}\n />\n ))}\n <DropdownMenu.Separator />\n <DropdownMenu.Item\n onClick={() => onRemoveAccess({ permission })}\n text={\"Remove permission\"}\n disabled={isRemovePermissionDisabled}\n />\n </DropdownMenu>\n );\n};\n"],"names":["TARGET_LEVELS","ListItemMeta","permission","target","targetsList","onRemoveAccess","onUpdatePermission","identity","useSecurity","currentLevel","useMemo","level","isListDisabled","isRemovePermissionDisabled","tooltipMessage","message","disabled","removePermissionDisabled","team","t","handle","Button","More","Tooltip","DropdownMenu","Text","setTimeout"],"mappings":";;;;AAMA,MAAMA,gBAAgB;IAClB;QACI,IAAI;QACJ,OAAO;QACP,aAAa;IACjB;IACA;QACI,IAAI;QACJ,OAAO;QACP,aAAa;IACjB;IACA;QACI,IAAI;QACJ,OAAO;QACP,aAAa;IACjB;IACA;QACI,IAAI;QACJ,OAAO;QACP,aAAa;IACjB;CACH;AAUM,MAAMC,eAAe,CAAC,EACzBC,UAAU,EACVC,MAAM,EACNC,WAAW,EACXC,cAAc,EACdC,kBAAkB,EACF;IAChB,MAAM,EAAEC,QAAQ,EAAE,GAAGC;IAErB,MAAMC,eAAeC,QAAQ,IAClBV,cAAc,IAAI,CAACW,CAAAA,QAASA,MAAM,EAAE,KAAKT,WAAW,KAAK,GACjE;QAACA,WAAW,KAAK;KAAC;IAErB,MAAM,EAAEU,cAAc,EAAEC,0BAA0B,EAAEC,cAAc,EAAE,GAAGJ,QAAQ;QAC3E,IAAIK,UAAU;QACd,IAAIC,WAAW;QACf,IAAIC,2BAA2B;QAE/B,IAAIf,WAAW,aAAa,EAAE,WAAW,YAAY;YACjDa,UAAU;YACVC,WAAW;YACXC,2BAA2B;QAC/B;QAEA,IAAIf,WAAW,MAAM,EAAE;YACnBa,UAAU;YACVC,WAAW;YACXC,2BAA2B;QAC/B;QAEA,IAAIV,SAAU,EAAE,KAAKJ,OAAO,EAAE,EAAE;YAC5BY,UAAU;YACV,IAAIb,WAAW,aAAa,EAAE,WAAW,UAAU;gBAC/C,MAAMgB,OAAOd,YAAY,IAAI,CAACe,CAAAA,IAAKA,EAAE,MAAM,KAAKjB,WAAW,aAAa;gBACxEa,WAAW;gBACX,IAAIG,MACAH,WAAW,CAAC,EAAE,EAAEG,KAAK,IAAI,CAAC,CAAC,CAAC;gBAEhCH,WAAW;YACf;YACAC,WAAW;YACXC,2BAA2B;QAC/B;QAEA,OAAO;YACH,gBAAgBD;YAChB,4BAA4BC;YAC5B,gBAAgBF;QACpB;IACJ,GAAG;QAACb;QAAYK;QAAUJ;QAAQC;KAAY;IAE9C,MAAMgB,SAASV,QAAQ;QACnB,IAAIU,SAAS,WAATA,GACA,oBAACC,QAAMA;YACH,SAAS;YACT,UAAU,CAAC,CAACT;YACZ,MAAMH,aAAa,KAAK;YACxB,oBAAM,oBAACa,gBAAIA;YACX,cAAc;;QAItB,IAAIR,gBACAM,SAAS,WAATA,GAAS,oBAACG,SAAOA;YAAC,SAAST;YAAgB,SAASM;;QAGxD,OAAOA;IACX,GAAG;QAACN;QAAgBF;QAAgBH,aAAa,KAAK;KAAC;IAEvD,OAAO,WAAP,GACI,oBAACe,cAAYA;QAAC,SAASJ;OAClBpB,cAAc,GAAG,CAACW,CAAAA,QAAAA,WAAAA,GACf,oBAACa,aAAa,YAAY;YACtB,KAAKb,MAAM,EAAE;YACb,SAASF,aAAa,EAAE,KAAKE,MAAM,EAAE;YACrC,oBACI,oBAAC,2BACG,oBAACc,MAAIA;gBAAC,IAAI;eAAQd,MAAM,KAAK,iBAC7B,oBAACc,MAAIA;gBAAC,IAAI;gBAAO,MAAM;gBAAM,WAAW;eACnCd,MAAM,WAAW;YAI9B,SAAS;gBAELe,WAAW;oBACPpB,mBAAmB;wBACf,YAAY;4BACR,GAAGJ,UAAU;4BACb,OAAOS,MAAM,EAAE;wBACnB;oBACJ;gBACJ,GAAG;YACP;2BAGR,oBAACa,aAAa,SAAS,uBACvB,oBAACA,aAAa,IAAI;QACd,SAAS,IAAMnB,eAAe;gBAAEH;YAAW;QAC3C,MAAM;QACN,UAAUW;;AAI1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/folders/folderModelProvider/FolderModelProvider.js","sources":["../../../../src/features/folders/folderModelProvider/FolderModelProvider.ts"],"sourcesContent":["import type { CmsModel } from \"@webiny/app-headless-cms-common/types/index.js\";\n\nimport { GetFolderModelRepository } from \"./abstractions.js\";\nimport { FolderModelProvider as Provider } from \"~/features/folders/abstractions.js\";\n\nclass FolderModelProviderImpl implements Provider.Interface {\n constructor(private repository: GetFolderModelRepository.Interface) {}\n\n async getModel(): Promise<CmsModel> {\n await this.repository.load();\n\n const model = this.repository.getModel();\n if (!model) {\n throw new Error(\"Unable to load File model!\");\n }\n\n return model;\n }\n\n async getGraphQLSelection(): Promise<string> {\n const model = await this.getModel();\n\n const valuesBlock =\n model.valuesSelection && model.valuesSelection !== \"_empty\"\n ? model.valuesSelection\n : \"\";\n\n return /* GraphQL */ `\n {\n id\n createdOn\n createdBy {\n id\n displayName\n }\n savedOn\n savedBy {\n id\n displayName\n }\n modifiedOn\n modifiedBy {\n id\n displayName\n }\n permissions {\n target\n level\n inheritedFrom\n }\n hasNonInheritedPermissions\n canManagePermissions\n canManageStructure\n canManageContent\n ${valuesBlock}\n }\n `;\n }\n}\n\nexport const FolderModelProvider = Provider.createImplementation({\n implementation: FolderModelProviderImpl,\n dependencies: [GetFolderModelRepository]\n});\n"],"names":["FolderModelProviderImpl","repository","model","Error","valuesBlock","FolderModelProvider","Provider","GetFolderModelRepository"],"mappings":";;AAKA,MAAMA;IACF,YAAoBC,UAA8C,CAAE;aAAhDA,UAAU,GAAVA;IAAiD;IAErE,MAAM,WAA8B;QAChC,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI;QAE1B,MAAMC,QAAQ,IAAI,CAAC,UAAU,CAAC,QAAQ;QACtC,IAAI,CAACA,OACD,MAAM,IAAIC,MAAM;QAGpB,OAAOD;IACX;IAEA,MAAM,sBAAuC;QACzC,MAAMA,QAAQ,MAAM,IAAI,CAAC,QAAQ;QAEjC,MAAME,cACFF,MAAM,eAAe,IAAIA,AAA0B,aAA1BA,MAAM,eAAe,GACxCA,MAAM,eAAe,GACrB;QAEV,OAAqB,CAAC
|
|
1
|
+
{"version":3,"file":"features/folders/folderModelProvider/FolderModelProvider.js","sources":["../../../../src/features/folders/folderModelProvider/FolderModelProvider.ts"],"sourcesContent":["import type { CmsModel } from \"@webiny/app-headless-cms-common/types/index.js\";\n\nimport { GetFolderModelRepository } from \"./abstractions.js\";\nimport { FolderModelProvider as Provider } from \"~/features/folders/abstractions.js\";\n\nclass FolderModelProviderImpl implements Provider.Interface {\n constructor(private repository: GetFolderModelRepository.Interface) {}\n\n async getModel(): Promise<CmsModel> {\n await this.repository.load();\n\n const model = this.repository.getModel();\n if (!model) {\n throw new Error(\"Unable to load File model!\");\n }\n\n return model;\n }\n\n async getGraphQLSelection(): Promise<string> {\n const model = await this.getModel();\n\n const valuesBlock =\n model.valuesSelection && model.valuesSelection !== \"_empty\"\n ? model.valuesSelection\n : \"\";\n\n return /* GraphQL */ `\n {\n id\n createdOn\n createdBy {\n id\n displayName\n }\n savedOn\n savedBy {\n id\n displayName\n }\n modifiedOn\n modifiedBy {\n id\n displayName\n }\n permissions {\n target\n level\n inheritedFrom\n plugin\n }\n hasNonInheritedPermissions\n canManagePermissions\n canManageStructure\n canManageContent\n ${valuesBlock}\n }\n `;\n }\n}\n\nexport const FolderModelProvider = Provider.createImplementation({\n implementation: FolderModelProviderImpl,\n dependencies: [GetFolderModelRepository]\n});\n"],"names":["FolderModelProviderImpl","repository","model","Error","valuesBlock","FolderModelProvider","Provider","GetFolderModelRepository"],"mappings":";;AAKA,MAAMA;IACF,YAAoBC,UAA8C,CAAE;aAAhDA,UAAU,GAAVA;IAAiD;IAErE,MAAM,WAA8B;QAChC,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI;QAE1B,MAAMC,QAAQ,IAAI,CAAC,UAAU,CAAC,QAAQ;QACtC,IAAI,CAACA,OACD,MAAM,IAAIC,MAAM;QAGpB,OAAOD;IACX;IAEA,MAAM,sBAAuC;QACzC,MAAMA,QAAQ,MAAM,IAAI,CAAC,QAAQ;QAEjC,MAAME,cACFF,MAAM,eAAe,IAAIA,AAA0B,aAA1BA,MAAM,eAAe,GACxCA,MAAM,eAAe,GACrB;QAEV,OAAqB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA4Bd,EAAEE,YAAY;;QAEtB,CAAC;IACL;AACJ;AAEO,MAAMC,0CAAsBC,oBAAAA,oBAA6B,CAAC;IAC7D,gBAAgBN;IAChB,cAAc;QAACO;KAAyB;AAC5C"}
|
|
@@ -33,7 +33,7 @@ class UpdateFolderGqlGatewayImpl {
|
|
|
33
33
|
slug,
|
|
34
34
|
extensions,
|
|
35
35
|
parentId: parentId === ROOT_FOLDER ? null : parentId,
|
|
36
|
-
permissions: permissions.filter((p)=>!p.inheritedFrom)
|
|
36
|
+
permissions: permissions.filter((p)=>!p.inheritedFrom && !p.plugin)
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/folders/updateFolder/UpdateFolderGqlGateway.js","sources":["../../../../src/features/folders/updateFolder/UpdateFolderGqlGateway.ts"],"sourcesContent":["import { MainGraphQLClient } from \"@webiny/app/features/mainGraphQLClient/index.js\";\nimport type { FolderDto } from \"~/domain/folder/FolderDto.js\";\nimport { FolderModelProvider } from \"~/features/folders/abstractions.js\";\nimport type { FolderGatewayDto } from \"./abstractions.js\";\nimport { UpdateFolderGateway as GatewayAbstraction } from \"./abstractions.js\";\nimport type { AcoError } from \"~/types.js\";\nimport { ROOT_FOLDER } from \"~/constants.js\";\n\nexport interface UpdateFolderResponse {\n aco: {\n updateFolder: {\n data: FolderDto;\n error: AcoError | null;\n };\n };\n}\n\nexport interface UpdateFolderVariables {\n id: string;\n data: Partial<\n Omit<\n FolderDto,\n \"id\" | \"createdOn\" | \"createdBy\" | \"savedOn\" | \"savedBy\" | \"modifiedOn\" | \"modifiedBy\"\n >\n >;\n}\n\nexport const UPDATE_FOLDER = (FOLDER_FIELDS: string) => /* GraphQL */ `\n mutation UpdateFolder($id: ID!, $data: FolderUpdateInput!) {\n aco {\n updateFolder(id: $id, data: $data) {\n data ${FOLDER_FIELDS}\n error {\n code\n data\n message\n }\n }\n }\n }\n`;\n\nclass UpdateFolderGqlGatewayImpl implements GatewayAbstraction.Interface {\n constructor(\n private client: MainGraphQLClient.Interface,\n private folderModelProvider: FolderModelProvider.Interface\n ) {}\n\n async execute(folder: FolderGatewayDto) {\n const fields = await this.folderModelProvider.getGraphQLSelection();\n\n const { id, title, slug, permissions, parentId, extensions } = folder;\n\n const response = await this.client.execute<UpdateFolderResponse, UpdateFolderVariables>({\n query: UPDATE_FOLDER(fields),\n variables: {\n id,\n data: {\n title,\n slug,\n extensions,\n parentId: parentId === ROOT_FOLDER ? null : parentId,\n permissions: permissions.filter(p => !p.inheritedFrom)\n }\n }\n });\n\n if (!response) {\n throw new Error(\"Network error while updating folder.\");\n }\n\n const { data, error } = response.aco.updateFolder;\n\n if (!data) {\n throw new Error(error?.message || \"Could not update folder\");\n }\n\n return data;\n }\n}\n\nexport const UpdateFolderGqlGateway = GatewayAbstraction.createImplementation({\n implementation: UpdateFolderGqlGatewayImpl,\n dependencies: [MainGraphQLClient, FolderModelProvider]\n});\n"],"names":["UPDATE_FOLDER","FOLDER_FIELDS","UpdateFolderGqlGatewayImpl","client","folderModelProvider","folder","fields","id","title","slug","permissions","parentId","extensions","response","ROOT_FOLDER","p","Error","data","error","UpdateFolderGqlGateway","GatewayAbstraction","MainGraphQLClient","FolderModelProvider"],"mappings":";;;;AA2BO,MAAMA,gBAAgB,CAACC,gBAAwC,CAAC;;;;qBAIlD,EAAEA,cAAc;;;;;;;;;AASrC,CAAC;AAED,MAAMC;IACF,YACYC,MAAmC,EACnCC,mBAAkD,CAC5D;aAFUD,MAAM,GAANA;aACAC,mBAAmB,GAAnBA;IACT;IAEH,MAAM,QAAQC,MAAwB,EAAE;QACpC,MAAMC,SAAS,MAAM,IAAI,CAAC,mBAAmB,CAAC,mBAAmB;QAEjE,MAAM,EAAEC,EAAE,EAAEC,KAAK,EAAEC,IAAI,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,UAAU,EAAE,GAAGP;QAE/D,MAAMQ,WAAW,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAA8C;YACpF,OAAOb,cAAcM;YACrB,WAAW;gBACPC;gBACA,MAAM;oBACFC;oBACAC;oBACAG;oBACA,UAAUD,aAAaG,cAAc,OAAOH;oBAC5C,aAAaD,YAAY,MAAM,CAACK,CAAAA,IAAK,CAACA,EAAE,aAAa;
|
|
1
|
+
{"version":3,"file":"features/folders/updateFolder/UpdateFolderGqlGateway.js","sources":["../../../../src/features/folders/updateFolder/UpdateFolderGqlGateway.ts"],"sourcesContent":["import { MainGraphQLClient } from \"@webiny/app/features/mainGraphQLClient/index.js\";\nimport type { FolderDto } from \"~/domain/folder/FolderDto.js\";\nimport { FolderModelProvider } from \"~/features/folders/abstractions.js\";\nimport type { FolderGatewayDto } from \"./abstractions.js\";\nimport { UpdateFolderGateway as GatewayAbstraction } from \"./abstractions.js\";\nimport type { AcoError } from \"~/types.js\";\nimport { ROOT_FOLDER } from \"~/constants.js\";\n\nexport interface UpdateFolderResponse {\n aco: {\n updateFolder: {\n data: FolderDto;\n error: AcoError | null;\n };\n };\n}\n\nexport interface UpdateFolderVariables {\n id: string;\n data: Partial<\n Omit<\n FolderDto,\n \"id\" | \"createdOn\" | \"createdBy\" | \"savedOn\" | \"savedBy\" | \"modifiedOn\" | \"modifiedBy\"\n >\n >;\n}\n\nexport const UPDATE_FOLDER = (FOLDER_FIELDS: string) => /* GraphQL */ `\n mutation UpdateFolder($id: ID!, $data: FolderUpdateInput!) {\n aco {\n updateFolder(id: $id, data: $data) {\n data ${FOLDER_FIELDS}\n error {\n code\n data\n message\n }\n }\n }\n }\n`;\n\nclass UpdateFolderGqlGatewayImpl implements GatewayAbstraction.Interface {\n constructor(\n private client: MainGraphQLClient.Interface,\n private folderModelProvider: FolderModelProvider.Interface\n ) {}\n\n async execute(folder: FolderGatewayDto) {\n const fields = await this.folderModelProvider.getGraphQLSelection();\n\n const { id, title, slug, permissions, parentId, extensions } = folder;\n\n const response = await this.client.execute<UpdateFolderResponse, UpdateFolderVariables>({\n query: UPDATE_FOLDER(fields),\n variables: {\n id,\n data: {\n title,\n slug,\n extensions,\n parentId: parentId === ROOT_FOLDER ? null : parentId,\n permissions: permissions.filter(p => !p.inheritedFrom && !p.plugin)\n }\n }\n });\n\n if (!response) {\n throw new Error(\"Network error while updating folder.\");\n }\n\n const { data, error } = response.aco.updateFolder;\n\n if (!data) {\n throw new Error(error?.message || \"Could not update folder\");\n }\n\n return data;\n }\n}\n\nexport const UpdateFolderGqlGateway = GatewayAbstraction.createImplementation({\n implementation: UpdateFolderGqlGatewayImpl,\n dependencies: [MainGraphQLClient, FolderModelProvider]\n});\n"],"names":["UPDATE_FOLDER","FOLDER_FIELDS","UpdateFolderGqlGatewayImpl","client","folderModelProvider","folder","fields","id","title","slug","permissions","parentId","extensions","response","ROOT_FOLDER","p","Error","data","error","UpdateFolderGqlGateway","GatewayAbstraction","MainGraphQLClient","FolderModelProvider"],"mappings":";;;;AA2BO,MAAMA,gBAAgB,CAACC,gBAAwC,CAAC;;;;qBAIlD,EAAEA,cAAc;;;;;;;;;AASrC,CAAC;AAED,MAAMC;IACF,YACYC,MAAmC,EACnCC,mBAAkD,CAC5D;aAFUD,MAAM,GAANA;aACAC,mBAAmB,GAAnBA;IACT;IAEH,MAAM,QAAQC,MAAwB,EAAE;QACpC,MAAMC,SAAS,MAAM,IAAI,CAAC,mBAAmB,CAAC,mBAAmB;QAEjE,MAAM,EAAEC,EAAE,EAAEC,KAAK,EAAEC,IAAI,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,UAAU,EAAE,GAAGP;QAE/D,MAAMQ,WAAW,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAA8C;YACpF,OAAOb,cAAcM;YACrB,WAAW;gBACPC;gBACA,MAAM;oBACFC;oBACAC;oBACAG;oBACA,UAAUD,aAAaG,cAAc,OAAOH;oBAC5C,aAAaD,YAAY,MAAM,CAACK,CAAAA,IAAK,CAACA,EAAE,aAAa,IAAI,CAACA,EAAE,MAAM;gBACtE;YACJ;QACJ;QAEA,IAAI,CAACF,UACD,MAAM,IAAIG,MAAM;QAGpB,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAE,GAAGL,SAAS,GAAG,CAAC,YAAY;QAEjD,IAAI,CAACI,MACD,MAAM,IAAID,MAAME,OAAO,WAAW;QAGtC,OAAOD;IACX;AACJ;AAEO,MAAME,yBAAyBC,oBAAAA,oBAAuC,CAAC;IAC1E,gBAAgBlB;IAChB,cAAc;QAACmB;QAAmBC;KAAoB;AAC1D"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { UpdateFolderUseCase as UseCaseAbstraction } from "../abstractions.js";
|
|
2
|
-
declare class
|
|
2
|
+
declare class UpdateFolderUseCaseWithoutReadOnlyPermissionsImpl implements UseCaseAbstraction.Interface {
|
|
3
3
|
private decoratee;
|
|
4
4
|
constructor(decoratee: UseCaseAbstraction.Interface);
|
|
5
5
|
execute(folder: UseCaseAbstraction.Params): Promise<void>;
|
|
6
6
|
}
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const UpdateFolderUseCaseWithoutReadOnlyPermissions: typeof UpdateFolderUseCaseWithoutReadOnlyPermissionsImpl & {
|
|
8
8
|
__abstraction: import("@webiny/di").Abstraction<import("../abstractions.js").IUpdateFolderUseCase>;
|
|
9
9
|
};
|
|
10
10
|
export {};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { UpdateFolderUseCase } from "../abstractions.js";
|
|
2
|
-
class
|
|
2
|
+
class UpdateFolderUseCaseWithoutReadOnlyPermissionsImpl {
|
|
3
3
|
constructor(decoratee){
|
|
4
4
|
this.decoratee = decoratee;
|
|
5
5
|
}
|
|
6
6
|
async execute(folder) {
|
|
7
|
-
const filteredPermissions = folder.permissions.filter((p)=>!p.inheritedFrom);
|
|
7
|
+
const filteredPermissions = folder.permissions.filter((p)=>!p.inheritedFrom && !p.plugin);
|
|
8
8
|
await this.decoratee.execute({
|
|
9
9
|
...folder,
|
|
10
10
|
permissions: filteredPermissions
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
const
|
|
15
|
-
decorator:
|
|
14
|
+
const UpdateFolderUseCaseWithoutReadOnlyPermissions = UpdateFolderUseCase.createDecorator({
|
|
15
|
+
decorator: UpdateFolderUseCaseWithoutReadOnlyPermissionsImpl,
|
|
16
16
|
dependencies: []
|
|
17
17
|
});
|
|
18
|
-
export {
|
|
18
|
+
export { UpdateFolderUseCaseWithoutReadOnlyPermissions };
|
|
19
19
|
|
|
20
|
-
//# sourceMappingURL=
|
|
20
|
+
//# sourceMappingURL=UseCaseWithoutReadOnlyPermissions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/folders/updateFolder/decorators/UseCaseWithoutReadOnlyPermissions.js","sources":["../../../../../src/features/folders/updateFolder/decorators/UseCaseWithoutReadOnlyPermissions.ts"],"sourcesContent":["import { UpdateFolderUseCase as UseCaseAbstraction } from \"../abstractions.js\";\n\nclass UpdateFolderUseCaseWithoutReadOnlyPermissionsImpl implements UseCaseAbstraction.Interface {\n constructor(private decoratee: UseCaseAbstraction.Interface) {}\n\n async execute(folder: UseCaseAbstraction.Params) {\n // Some permissions are read-only: inherited ones are contributed by a parent folder, and\n // code-defined ones by an `FlpFactory` on the API side. Neither is stored on the folder\n // itself, and the API rejects them on write, so we must omit them.\n const filteredPermissions = folder.permissions.filter(p => !p.inheritedFrom && !p.plugin);\n\n await this.decoratee.execute({\n ...folder,\n permissions: filteredPermissions\n });\n }\n}\n\nexport const UpdateFolderUseCaseWithoutReadOnlyPermissions = UseCaseAbstraction.createDecorator({\n decorator: UpdateFolderUseCaseWithoutReadOnlyPermissionsImpl,\n dependencies: []\n});\n"],"names":["UpdateFolderUseCaseWithoutReadOnlyPermissionsImpl","decoratee","folder","filteredPermissions","p","UpdateFolderUseCaseWithoutReadOnlyPermissions","UseCaseAbstraction"],"mappings":";AAEA,MAAMA;IACF,YAAoBC,SAAuC,CAAE;aAAzCA,SAAS,GAATA;IAA0C;IAE9D,MAAM,QAAQC,MAAiC,EAAE;QAI7C,MAAMC,sBAAsBD,OAAO,WAAW,CAAC,MAAM,CAACE,CAAAA,IAAK,CAACA,EAAE,aAAa,IAAI,CAACA,EAAE,MAAM;QAExF,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;YACzB,GAAGF,MAAM;YACT,aAAaC;QACjB;IACJ;AACJ;AAEO,MAAME,gDAAgDC,oBAAAA,eAAkC,CAAC;IAC5F,WAAWN;IACX,cAAc,EAAE;AACpB"}
|
|
@@ -6,7 +6,7 @@ import { UpdateFolderRepository } from "./UpdateFolderRepository.js";
|
|
|
6
6
|
import { UpdateFolderGqlGateway } from "./UpdateFolderGqlGateway.js";
|
|
7
7
|
import { UpdateFolderRepositoryWithPathChange } from "./decorators/RepositoryWithPathChange.js";
|
|
8
8
|
import { UpdateFolderRepositoryWithPermissionsChange } from "./decorators/RepositoryWithPermissionsChange.js";
|
|
9
|
-
import {
|
|
9
|
+
import { UpdateFolderUseCaseWithoutReadOnlyPermissions } from "./decorators/UseCaseWithoutReadOnlyPermissions.js";
|
|
10
10
|
import { UpdateFolderUseCaseWithLoading } from "./decorators/UseCaseWithLoading.js";
|
|
11
11
|
const UpdateFolderFeature = createFeature({
|
|
12
12
|
name: "UpdateFolder",
|
|
@@ -16,7 +16,7 @@ const UpdateFolderFeature = createFeature({
|
|
|
16
16
|
container.register(UpdateFolderGqlGateway);
|
|
17
17
|
container.registerDecorator(UpdateFolderRepositoryWithPathChange);
|
|
18
18
|
container.registerDecorator(UpdateFolderRepositoryWithPermissionsChange);
|
|
19
|
-
container.registerDecorator(
|
|
19
|
+
container.registerDecorator(UpdateFolderUseCaseWithoutReadOnlyPermissions);
|
|
20
20
|
container.registerDecorator(UpdateFolderUseCaseWithLoading);
|
|
21
21
|
},
|
|
22
22
|
resolve (container) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/folders/updateFolder/feature.js","sources":["../../../../src/features/folders/updateFolder/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { FoldersLoadingRepository } from \"~/features/folders/abstractions.js\";\nimport { UpdateFolderUseCase as UseCase } from \"./abstractions.js\";\nimport { UpdateFolderUseCase } from \"./UpdateFolderUseCase.js\";\nimport { UpdateFolderRepository } from \"./UpdateFolderRepository.js\";\nimport { UpdateFolderGqlGateway } from \"./UpdateFolderGqlGateway.js\";\nimport { UpdateFolderRepositoryWithPathChange } from \"./decorators/RepositoryWithPathChange.js\";\nimport { UpdateFolderRepositoryWithPermissionsChange } from \"./decorators/RepositoryWithPermissionsChange.js\";\nimport {
|
|
1
|
+
{"version":3,"file":"features/folders/updateFolder/feature.js","sources":["../../../../src/features/folders/updateFolder/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { FoldersLoadingRepository } from \"~/features/folders/abstractions.js\";\nimport { UpdateFolderUseCase as UseCase } from \"./abstractions.js\";\nimport { UpdateFolderUseCase } from \"./UpdateFolderUseCase.js\";\nimport { UpdateFolderRepository } from \"./UpdateFolderRepository.js\";\nimport { UpdateFolderGqlGateway } from \"./UpdateFolderGqlGateway.js\";\nimport { UpdateFolderRepositoryWithPathChange } from \"./decorators/RepositoryWithPathChange.js\";\nimport { UpdateFolderRepositoryWithPermissionsChange } from \"./decorators/RepositoryWithPermissionsChange.js\";\nimport { UpdateFolderUseCaseWithoutReadOnlyPermissions } from \"./decorators/UseCaseWithoutReadOnlyPermissions.js\";\nimport { UpdateFolderUseCaseWithLoading } from \"./decorators/UseCaseWithLoading.js\";\n\nexport const UpdateFolderFeature = createFeature({\n name: \"UpdateFolder\",\n register(container) {\n // Register base use case\n container.register(UpdateFolderUseCase);\n\n // Register base repository\n container.register(UpdateFolderRepository).inSingletonScope();\n\n // Register gateway\n container.register(UpdateFolderGqlGateway);\n\n // Register repository decorators (innermost first)\n container.registerDecorator(UpdateFolderRepositoryWithPathChange);\n container.registerDecorator(UpdateFolderRepositoryWithPermissionsChange);\n\n // Register use case decorators (innermost first)\n container.registerDecorator(UpdateFolderUseCaseWithoutReadOnlyPermissions);\n container.registerDecorator(UpdateFolderUseCaseWithLoading);\n },\n resolve(container) {\n return {\n useCase: container.resolve(UseCase),\n loading: container.resolve(FoldersLoadingRepository)\n };\n }\n});\n"],"names":["UpdateFolderFeature","createFeature","container","UpdateFolderUseCase","UpdateFolderRepository","UpdateFolderGqlGateway","UpdateFolderRepositoryWithPathChange","UpdateFolderRepositoryWithPermissionsChange","UpdateFolderUseCaseWithoutReadOnlyPermissions","UpdateFolderUseCaseWithLoading","UseCase","FoldersLoadingRepository"],"mappings":";;;;;;;;;;AAWO,MAAMA,sBAAsBC,cAAc;IAC7C,MAAM;IACN,UAASC,SAAS;QAEdA,UAAU,QAAQ,CAACC;QAGnBD,UAAU,QAAQ,CAACE,wBAAwB,gBAAgB;QAG3DF,UAAU,QAAQ,CAACG;QAGnBH,UAAU,iBAAiB,CAACI;QAC5BJ,UAAU,iBAAiB,CAACK;QAG5BL,UAAU,iBAAiB,CAACM;QAC5BN,UAAU,iBAAiB,CAACO;IAChC;IACA,SAAQP,SAAS;QACb,OAAO;YACH,SAASA,UAAU,OAAO,CAACQ;YAC3B,SAASR,UAAU,OAAO,CAACS;QAC/B;IACJ;AACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-aco",
|
|
3
|
-
"version": "6.6.0-alpha.
|
|
3
|
+
"version": "6.6.0-alpha.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js",
|
|
@@ -15,19 +15,19 @@
|
|
|
15
15
|
"author": "Webiny Ltd.",
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@webiny/admin-ui": "6.6.0-alpha.
|
|
19
|
-
"@webiny/app": "6.6.0-alpha.
|
|
20
|
-
"@webiny/app-admin": "6.6.0-alpha.
|
|
21
|
-
"@webiny/app-headless-cms-common": "6.6.0-alpha.
|
|
22
|
-
"@webiny/app-utils": "6.6.0-alpha.
|
|
23
|
-
"@webiny/feature": "6.6.0-alpha.
|
|
24
|
-
"@webiny/feature-flags": "6.6.0-alpha.
|
|
25
|
-
"@webiny/form": "6.6.0-alpha.
|
|
26
|
-
"@webiny/icons": "6.6.0-alpha.
|
|
27
|
-
"@webiny/react-properties": "6.6.0-alpha.
|
|
28
|
-
"@webiny/shared-aco": "6.6.0-alpha.
|
|
29
|
-
"@webiny/utils": "6.6.0-alpha.
|
|
30
|
-
"@webiny/validation": "6.6.0-alpha.
|
|
18
|
+
"@webiny/admin-ui": "6.6.0-alpha.7",
|
|
19
|
+
"@webiny/app": "6.6.0-alpha.7",
|
|
20
|
+
"@webiny/app-admin": "6.6.0-alpha.7",
|
|
21
|
+
"@webiny/app-headless-cms-common": "6.6.0-alpha.7",
|
|
22
|
+
"@webiny/app-utils": "6.6.0-alpha.7",
|
|
23
|
+
"@webiny/feature": "6.6.0-alpha.7",
|
|
24
|
+
"@webiny/feature-flags": "6.6.0-alpha.7",
|
|
25
|
+
"@webiny/form": "6.6.0-alpha.7",
|
|
26
|
+
"@webiny/icons": "6.6.0-alpha.7",
|
|
27
|
+
"@webiny/react-properties": "6.6.0-alpha.7",
|
|
28
|
+
"@webiny/shared-aco": "6.6.0-alpha.7",
|
|
29
|
+
"@webiny/utils": "6.6.0-alpha.7",
|
|
30
|
+
"@webiny/validation": "6.6.0-alpha.7",
|
|
31
31
|
"lodash": "4.18.1",
|
|
32
32
|
"mobx": "7.0.3",
|
|
33
33
|
"mobx-react-lite": "5.0.3",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/react": "18.3.31",
|
|
40
|
-
"@webiny/build-tools": "6.6.0-alpha.
|
|
40
|
+
"@webiny/build-tools": "6.6.0-alpha.7",
|
|
41
41
|
"@webiny/di": "1.1.0",
|
|
42
|
-
"@webiny/wcp": "6.6.0-alpha.
|
|
42
|
+
"@webiny/wcp": "6.6.0-alpha.7",
|
|
43
43
|
"rimraf": "6.1.3",
|
|
44
44
|
"typescript": "7.0.2",
|
|
45
45
|
"vitest": "4.1.11"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"features/folders/updateFolder/decorators/UseCaseWithoutInheritedPermissions.js","sources":["../../../../../src/features/folders/updateFolder/decorators/UseCaseWithoutInheritedPermissions.ts"],"sourcesContent":["import { UpdateFolderUseCase as UseCaseAbstraction } from \"../abstractions.js\";\n\nclass UpdateFolderUseCaseWithoutInheritedPermissionsImpl implements UseCaseAbstraction.Interface {\n constructor(private decoratee: UseCaseAbstraction.Interface) {}\n\n async execute(folder: UseCaseAbstraction.Params) {\n // We must omit all inherited permissions.\n const filteredPermissions = folder.permissions.filter(p => !p.inheritedFrom);\n\n await this.decoratee.execute({\n ...folder,\n permissions: filteredPermissions\n });\n }\n}\n\nexport const UpdateFolderUseCaseWithoutInheritedPermissions = UseCaseAbstraction.createDecorator({\n decorator: UpdateFolderUseCaseWithoutInheritedPermissionsImpl,\n dependencies: []\n});\n"],"names":["UpdateFolderUseCaseWithoutInheritedPermissionsImpl","decoratee","folder","filteredPermissions","p","UpdateFolderUseCaseWithoutInheritedPermissions","UseCaseAbstraction"],"mappings":";AAEA,MAAMA;IACF,YAAoBC,SAAuC,CAAE;aAAzCA,SAAS,GAATA;IAA0C;IAE9D,MAAM,QAAQC,MAAiC,EAAE;QAE7C,MAAMC,sBAAsBD,OAAO,WAAW,CAAC,MAAM,CAACE,CAAAA,IAAK,CAACA,EAAE,aAAa;QAE3E,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;YACzB,GAAGF,MAAM;YACT,aAAaC;QACjB;IACJ;AACJ;AAEO,MAAME,iDAAiDC,oBAAAA,eAAkC,CAAC;IAC7F,WAAWN;IACX,cAAc,EAAE;AACpB"}
|