@elementor/editor-variables 3.35.0-448 → 3.35.0-450

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.mjs CHANGED
@@ -735,15 +735,15 @@ import { __ as __5 } from "@wordpress/i18n";
735
735
  // src/hooks/use-permissions.ts
736
736
  import { useCurrentUserCapabilities } from "@elementor/editor-current-user";
737
737
  var usePermissions = () => {
738
- const { canUser } = useCurrentUserCapabilities();
738
+ const { canUser, isAdmin } = useCurrentUserCapabilities();
739
739
  return {
740
740
  canAssign: () => canUser("edit_posts"),
741
741
  canUnlink: () => canUser("edit_posts"),
742
- canAdd: () => canUser("manage_options"),
743
- canDelete: () => canUser("manage_options"),
744
- canEdit: () => canUser("manage_options"),
745
- canRestore: () => canUser("manage_options"),
746
- canManageSettings: () => canUser("manage_options")
742
+ canAdd: () => isAdmin,
743
+ canDelete: () => isAdmin,
744
+ canEdit: () => isAdmin,
745
+ canRestore: () => isAdmin,
746
+ canManageSettings: () => isAdmin
747
747
  };
748
748
  };
749
749