diff --git a/RELEASE.md b/RELEASE.md
index 1c179dab9..175a50e05 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -67,7 +67,7 @@
### Fix
-- ...
+- L'assegnazione dei ruoli nella vista gruppi funziona correttamente per tutti i gruppi di utenti.
## Versione 11.23.1 (19/09/2024)
diff --git a/src/customizations/volto/components/manage/Controlpanels/Groups/GroupsControlpanel.jsx b/src/customizations/volto/components/manage/Controlpanels/Groups/GroupsControlpanel.jsx
new file mode 100644
index 000000000..2afb4b07e
--- /dev/null
+++ b/src/customizations/volto/components/manage/Controlpanels/Groups/GroupsControlpanel.jsx
@@ -0,0 +1,709 @@
+// CUSTOMIZATION:
+// - 124: Set AuthenticatedUsers roles as authenticatedRole for all groups
+// - 263: Changed updateGroupRole function to update all checkboxes when changing the AuthenticatedUsers checkboxes
+
+/**
+ * Users controlpanel container.
+ * @module components/manage/Controlpanels/UsersControlpanel
+ */
+import {
+ createGroup,
+ deleteGroup,
+ listGroups,
+ getControlpanel,
+ listRoles,
+ updateGroup,
+ authenticatedRole,
+} from '@plone/volto/actions';
+import {
+ Icon,
+ ModalForm,
+ Toast,
+ Toolbar,
+ RenderGroups,
+ Pagination,
+ Error,
+} from '@plone/volto/components';
+import { Link } from 'react-router-dom';
+import { Helmet, messages } from '@plone/volto/helpers';
+import clearSVG from '@plone/volto/icons/clear.svg';
+import addUserSvg from '@plone/volto/icons/add-user.svg';
+import saveSVG from '@plone/volto/icons/save.svg';
+import ploneSVG from '@plone/volto/icons/plone.svg';
+import { find, map } from 'lodash';
+import PropTypes from 'prop-types';
+import React, { Component } from 'react';
+import { FormattedMessage, injectIntl } from 'react-intl';
+import { Portal } from 'react-portal';
+import { connect } from 'react-redux';
+
+import { toast } from 'react-toastify';
+import { bindActionCreators, compose } from 'redux';
+import {
+ Confirm,
+ Container,
+ Button,
+ Form,
+ Input,
+ Segment,
+ Table,
+} from 'semantic-ui-react';
+
+/**
+ * GroupsControlpanel class.
+ * @class GroupsControlpanel
+ * @extends Component
+ */
+class GroupsControlpanel extends Component {
+ /**
+ * Property types.
+ * @property {Object} propTypes Property types.
+ * @static
+ */
+ static propTypes = {
+ listRoles: PropTypes.func.isRequired,
+ listGroups: PropTypes.func.isRequired,
+ pathname: PropTypes.string.isRequired,
+ roles: PropTypes.arrayOf(
+ PropTypes.shape({
+ '@id': PropTypes.string,
+ '@type': PropTypes.string,
+ id: PropTypes.string,
+ }),
+ ).isRequired,
+ groups: PropTypes.arrayOf(
+ PropTypes.shape({
+ Title: PropTypes.string,
+ Description: PropTypes.string,
+ roles: PropTypes.arrayOf(PropTypes.string),
+ groupname: PropTypes.string,
+ }),
+ ).isRequired,
+ };
+
+ /**
+ * Constructor
+ * @method constructor
+ * @param {Object} props Component properties
+ * @constructs Sharing
+ */
+ constructor(props) {
+ super(props);
+ this.onChangeSearch = this.onChangeSearch.bind(this);
+ this.onSearchGroups = this.onSearchGroups.bind(this);
+ this.deleteGroup = this.deleteGroup.bind(this);
+ this.onDeleteOk = this.onDeleteOk.bind(this);
+ this.onDeleteCancel = this.onDeleteCancel.bind(this);
+ this.onAddGroupSubmit = this.onAddGroupSubmit.bind(this);
+ this.onAddGroupError = this.onAddGroupError.bind(this);
+ this.onAddGroupSuccess = this.onAddGroupSuccess.bind(this);
+ this.updateGroupRole = this.updateGroupRole.bind(this);
+ this.state = {
+ search: '',
+ isLoading: false,
+ addGroupError: '',
+ showDelete: false,
+ groupToDelete: undefined,
+ showAddGroup: false,
+ groupEntries: [],
+ isClient: false,
+ authenticatedRole: props.inheritedRole || [],
+ currentPage: 0,
+ pageSize: 10,
+ };
+ }
+
+ fetchData = async () => {
+ await this.props.getControlpanel('usergroup');
+ await this.props.listRoles();
+ if (!this.props.many_groups) {
+ await this.props.listGroups();
+ const inheritedRoles = this.props.groups?.find(
+ (el) => el.id === 'AuthenticatedUsers',
+ )?.roles;
+ this.setState({
+ groupEntries: this.props.groups,
+ authenticatedRole: inheritedRoles,
+ });
+ }
+ };
+ /**
+ * Component did mount
+ * @method componentDidMount
+ * @returns {undefined}
+ */
+ componentDidMount() {
+ this.setState({
+ isClient: true,
+ });
+ this.fetchData();
+ }
+
+ UNSAFE_componentWillReceiveProps(nextProps) {
+ if (
+ (this.props.deleteGroupRequest.loading &&
+ nextProps.deleteGroupRequest.loaded) ||
+ (this.props.createGroupRequest.loading &&
+ nextProps.createGroupRequest.loaded)
+ ) {
+ this.props.listGroups(this.state.search);
+ }
+ if (
+ this.props.createGroupRequest.loading &&
+ nextProps.createGroupRequest.loaded
+ ) {
+ this.onAddGroupSuccess();
+ }
+ if (
+ this.props.createGroupRequest.loading &&
+ nextProps.createGroupRequest.error
+ ) {
+ this.onAddGroupError(nextProps.createGroupRequest.error);
+ }
+ if (
+ this.props.loadRolesRequest.loading &&
+ nextProps.loadRolesRequest.error
+ ) {
+ this.setState({
+ error: nextProps.loadRolesRequest.error,
+ });
+ }
+ }
+
+ getGroupFromProps(value) {
+ return find(this.props.groups, ['@id', value]);
+ }
+
+ /**
+ *
+ *
+ * @param {*} event Event object
+ * @memberof GroupsControlpanel
+ * @returns {undefined}
+ */
+ onSearchGroups(event) {
+ this.setState({ isLoading: true });
+ event.preventDefault();
+ this.props
+ .listGroups(this.state.search)
+ .then(() => {
+ this.setState({ isLoading: false });
+ })
+ .catch((error) => {
+ this.setState({ isLoading: false });
+ // eslint-disable-next-line no-console
+ console.error('Error searching group', error);
+ });
+ }
+
+ /**
+ * On change search handler
+ * @method onChangeSearch
+ * @param {object} event Event object.
+ * @returns {undefined}
+ */
+ onChangeSearch(event) {
+ this.setState({
+ search: event.target.value,
+ });
+ }
+
+ /**
+ *
+ *
+ * @param {*} event Event object.
+ * @param {*} { value } id (groupname)
+ * @memberof GroupsControlpanel
+ * @returns {undefined}
+ */
+ deleteGroup(event, { value }) {
+ if (value) {
+ this.setState({
+ showDelete: true,
+ groupToDelete: this.getGroupFromProps(value),
+ });
+ }
+ }
+
+ /**
+ * On delete ok
+ * @method onDeleteOk
+ * @returns {undefined}
+ */
+ onDeleteOk() {
+ if (this.state.groupToDelete) {
+ this.props.deleteGroup(this.state.groupToDelete.id);
+ this.setState({
+ showDelete: false,
+ groupToDelete: undefined,
+ });
+ }
+ }
+
+ /**
+ * On delete cancel
+ * @method onDeleteCancel
+ * @returns {undefined}
+ */
+ onDeleteCancel() {
+ this.setState({
+ showDelete: false,
+ itemsToDelete: [],
+ });
+ }
+
+ /**
+ *
+ * @param {*} name
+ * @param {*} value
+ * @memberof GroupsControlpanel
+ */
+
+ updateGroupRole(name, value) {
+ this.setState((prevState) => {
+ let updatedAuthenticatedRole;
+ // check if checkbox is AuthenticatedUsers
+ if (name === 'AuthenticatedUsers') {
+ // check if that role is already set
+ updatedAuthenticatedRole = prevState.authenticatedRole.includes(value)
+ ? // Remove role if unchecked
+ prevState.authenticatedRole.filter((role) => role !== value)
+ : // Add role if checked
+ [...prevState.authenticatedRole, value];
+ } else {
+ // if not AuthenticatedUser, do not change the authenticated roles
+ updatedAuthenticatedRole = prevState.authenticatedRole;
+ }
+
+ // Handle the groupEntries role update
+ const updatedGroupEntries = map(prevState.groupEntries, (entry) => {
+ if (entry.id === name) {
+ if (entry.roles.includes(value)) {
+ // If the role is unchecked, remove it from roles
+ return {
+ ...entry,
+ roles: entry.roles.filter((role) => role !== value),
+ };
+ } else {
+ // If the role is checked, add it to roles
+ return {
+ ...entry,
+ roles: [...entry.roles, value],
+ };
+ }
+ } else if (
+ name === 'AuthenticatedUsers' &&
+ !prevState.authenticatedRole.includes(value)
+ ) {
+ // If 'AuthenticatedUsers' is unchecked, reset the other group roles
+ return {
+ ...entry,
+ roles: entry.roles.filter((role) => role !== value), // Remove the role from all other groups
+ };
+ }
+
+ return entry; // For other entries, return unchanged
+ });
+
+ return {
+ groupEntries: updatedGroupEntries,
+ authenticatedRole: updatedAuthenticatedRole,
+ };
+ });
+ }
+ /**
+ * @param {*} event
+ * @memberof GroupsControlpanel
+ */
+ updateGroupRoleSubmit = (e) => {
+ e.stopPropagation();
+ this.state.groupEntries.forEach((item) => {
+ this.props.updateGroup(item.id, item);
+ });
+ this.props.authenticatedRole(this.state.authenticatedRole);
+ toast.success(
+
+
+