Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add backend interface for roles management #362

Open
wants to merge 8 commits into
base: rainerd/incorporate-roles-management-code-into-the-core
Choose a base branch
from

Conversation

the-krg
Copy link

@the-krg the-krg commented Aug 23, 2023

Admin, RoleManagement View (can manage roles)

User Tabs

Screen Shot 2023-08-23 at 17 28 12

index

Screen Shot 2023-08-23 at 17 28 58

new

Screen Shot 2023-08-25 at 02 42 30

edit

Screen Shot 2023-08-25 at 02 42 00

UserDisplay, UserManagement View (can read roles)

index

Screen Shot 2023-08-23 at 17 31 16

No Permissions (cannot read neither manage roles)

index

Screen Shot 2023-08-23 at 17 39 31

Edit User

Screen Shot 2023-08-23 at 17 40 42

This commit introduces database schema changes to extend the role and
permission management capabilities of Solidus.
These changes are derived from the solidus_user_roles gem and are
designed to provide more granular control over user roles and permissions.

Changes include:
  * Create Spree Permission Sets:
      Introduced a new Spree::PermissionSet table in the database.
      This table will store sets of permissions, each with a name and set
      identifier, that can be assigned to user roles.

  * Create Spree Roles Permissions:
      Introduced a new Spree::RolePermission table in the database.
      This table will store the associations between roles and permission sets.
      It includes foreign key references to the Spree::Role and
      Spree::PermissionSet tables.
This commit expands the functionality of the `Spree::Role` model to provide more
granular and efficient control over user roles and permissions.

  * Spree::RolePermission
  * Spree::Role enhancements
  * Spree::PermissionSet

These enhancements are a part of our broader initiative to improve the
flexibility and extensibility of role and permission management in Solidus,
adapting functionality from the `solidus_user_roles` gem.
@waiting-for-dev
Copy link

Hey, @the-krg, it looks like tests are failing for some reason... 🙂

@the-krg the-krg force-pushed the the-krg/add-backend-interface-for-roles-management branch from c256d15 to f2b53ad Compare August 25, 2023 13:10
@the-krg the-krg force-pushed the the-krg/add-backend-interface-for-roles-management branch from f2b53ad to 8be04a7 Compare August 25, 2023 13:25
This permission set enables the user to manage roles and read users.
It makes no sense to duplicate a role that can access everything,
and another that shouldn't access anything.
@the-krg the-krg force-pushed the the-krg/add-backend-interface-for-roles-management branch from 8be04a7 to 12459fc Compare August 25, 2023 13:36
@the-krg the-krg force-pushed the rainerd/incorporate-roles-management-code-into-the-core branch 3 times, most recently from 8d8cbb5 to 9348fe7 Compare September 5, 2023 14:24
@the-krg the-krg force-pushed the rainerd/incorporate-roles-management-code-into-the-core branch from 9348fe7 to f4e0fd2 Compare September 12, 2023 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants