@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 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: () => canUser("manage_options"),
768
- canDelete: () => canUser("manage_options"),
769
- canEdit: () => canUser("manage_options"),
770
- canRestore: () => canUser("manage_options"),
771
- canManageSettings: () => canUser("manage_options")
767
+ canAdd: () => isAdmin,
768
+ canDelete: () => isAdmin,
769
+ canEdit: () => isAdmin,
770
+ canRestore: () => isAdmin,
771
+ canManageSettings: () => isAdmin
772
772
  };
773
773
  };
774
774