@elementor/editor-variables 3.35.0-447 → 3.35.0-449
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/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
- package/src/hooks/use-permissions.ts +6 -6
package/dist/index.js
CHANGED
|
@@ -760,15 +760,15 @@ var import_i18n5 = require("@wordpress/i18n");
|
|
|
760
760
|
// src/hooks/use-permissions.ts
|
|
761
761
|
var import_editor_current_user = require("@elementor/editor-current-user");
|
|
762
762
|
var usePermissions = () => {
|
|
763
|
-
const { canUser } = (0, import_editor_current_user.useCurrentUserCapabilities)();
|
|
763
|
+
const { canUser, isAdmin } = (0, import_editor_current_user.useCurrentUserCapabilities)();
|
|
764
764
|
return {
|
|
765
765
|
canAssign: () => canUser("edit_posts"),
|
|
766
766
|
canUnlink: () => canUser("edit_posts"),
|
|
767
|
-
canAdd: () =>
|
|
768
|
-
canDelete: () =>
|
|
769
|
-
canEdit: () =>
|
|
770
|
-
canRestore: () =>
|
|
771
|
-
canManageSettings: () =>
|
|
767
|
+
canAdd: () => isAdmin,
|
|
768
|
+
canDelete: () => isAdmin,
|
|
769
|
+
canEdit: () => isAdmin,
|
|
770
|
+
canRestore: () => isAdmin,
|
|
771
|
+
canManageSettings: () => isAdmin
|
|
772
772
|
};
|
|
773
773
|
};
|
|
774
774
|
|