Skip to content

Add User group functionality on admin and automatically associate users to groups upon signup#18

Closed
JustShah wants to merge 5 commits into
7-add-a-price-list-table-resourcefrom
6-add-the-optional-to-automatically-associate-users-to-groups-upon-signup
Closed

Add User group functionality on admin and automatically associate users to groups upon signup#18
JustShah wants to merge 5 commits into
7-add-a-price-list-table-resourcefrom
6-add-the-optional-to-automatically-associate-users-to-groups-upon-signup

Conversation

@JustShah

@JustShah JustShah commented Apr 8, 2025

Copy link
Copy Markdown

Description

This pull request introduces several enhancements to the Spree Admin interface, allowing for more efficient management of user groups.

Key Changes:

  • User Groups Management:

    • A new user groups feature has been added, allowing administrators to create and manage user groups. This enables targeted pricing strategies based on user group assignments.
  • Improved Navigation:

    • The admin navigation has been updated to include links to user groups, ensuring that these features are easily accessible.

These enhancements improve the overall organization of the admin interface, making it easier for administrators to manage user groups effectively.

Benefits:

  • Enhanced user management through user groups, allowing for more flexible pricing strategies.

@JustShah JustShah changed the title 6 add the optional to automatically associate users to groups upon signup Add the optional to automatically associate users to groups upon signup Apr 8, 2025
@JustShah JustShah force-pushed the 6-add-the-optional-to-automatically-associate-users-to-groups-upon-signup branch from 76f94ba to 61c4c6b Compare April 8, 2025 14:55
@fthobe fthobe changed the title Add the optional to automatically associate users to groups upon signup Add the option to automatically associate users to groups upon signup Apr 8, 2025
@JustShah JustShah force-pushed the 7-add-a-price-list-table-resource branch from 8a054e3 to 1bd84cc Compare April 9, 2025 05:17
@JustShah JustShah force-pushed the 6-add-the-optional-to-automatically-associate-users-to-groups-upon-signup branch from 61c4c6b to c51f789 Compare April 9, 2025 05:21
@JustShah JustShah force-pushed the 7-add-a-price-list-table-resource branch from 1bd84cc to 0a6d710 Compare April 9, 2025 05:24
@JustShah JustShah force-pushed the 6-add-the-optional-to-automatically-associate-users-to-groups-upon-signup branch from c51f789 to bed02f2 Compare April 9, 2025 05:25
@JustShah JustShah force-pushed the 7-add-a-price-list-table-resource branch 4 times, most recently from 0c6af2a to d515d0f Compare April 9, 2025 05:36
JustShah added 5 commits April 9, 2025 11:09
…management

Added associations in Spree::User model for user groups to support grouping users for targeted pricing and management.
Created Spree::UserGroup model with associations to users, stores, and price lists to enable flexible user group management.
Updated Spree::PriceList model to include associations with user groups for dynamic pricing based on user groups.
Updated locale files to include translations for user groups.
Added migrations to create spree_user_groups table and add user group references to users and stores.
- Added UserGroupsController to manage user groups.
- Created views for user group management, including:
  - New user group form (`new.html.erb`)
  - User group edit form (`edit.html.erb`)
  - User group index view (`index.html.erb`)
  - Partial view for user group form fields.
- Enhanced user management by allowing assignment of user groups to users in the user form.
- Updated store form to include a selection for the default cart user group.
- Implemented data loading for price lists in user group forms.
- Added breadcrumb navigation for improved user experience in the admin panel.

This feature allows administrators to create, edit, and manage user groups, facilitating better organization and access control for users within the Spree application.
- Created a new users sub-menu partial to manage user-related navigation, including links to users and user groups.

These enhancements improve the organization of the admin interface, making it easier for administrators to manage user groups effectively.
- Updated UsersController to assign the default user group to new users if the current store has the `enforce_group_upon_signup` setting enabled.
- Added a checkbox in the store settings form to allow administrators to enable or disable the `enforce_group_upon_signup` feature.
- Included a new translation key for the `enforce_group_upon_signup` label in the English locale file.

This feature ensures that all new users are automatically added to a specified user group, improving user management and organization within the Spree application.
This commits adds column on price list index to display  the number of user groups associated to
a price list.
@JustShah JustShah force-pushed the 6-add-the-optional-to-automatically-associate-users-to-groups-upon-signup branch from bed02f2 to 7e52bb1 Compare April 9, 2025 05:42
@JustShah JustShah changed the title Add the option to automatically associate users to groups upon signup Add User group functionality on admin and automatically associate users to groups upon signup Apr 9, 2025
@JustShah

JustShah commented Apr 9, 2025

Copy link
Copy Markdown
Author

Created a new independent and improved PR: #20

@JustShah JustShah closed this Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant