solidus icon indicating copy to clipboard operation
solidus copied to clipboard

Integrate Role and Permission Management from `solidus_user_roles` (solidus_core step)

Open rainerdema opened this issue 2 years ago • 2 comments

Summary

Fixes #5105

This PR integrates role and permission management capabilities from the solidus_user_roles gem directly into Solidus, providing greater flexibility and control over user roles and permissions.

Major changes include:

  1. Permission Sets: A new Spree::PermissionSet model has been added to the database schema. This model represents sets of permissions that can be assigned to roles. Each permission set has a name and a set identifier.

  2. Role Permissions: A new Spree::RolePermission model has been added to the database schema. This model represents the association between roles and permission sets.

  3. Data Migration: Pull Request This rake task creates Spree::PermissionSet records for each existing permission set subclass in Spree::PermissionSets::*, and Spree::RolePermission records for each role's associated permission sets. (It is designed to work with both new installations and existing Solidus stores that have custom roles and permissions).

bin/rails solidus:import_existing_permission_sets
  1. ~Backend interface: closed~

  2. ~Admin interface: Will only be merged into nebulab/admin branch~

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

  • 📖 I have updated the README to account for my changes.
  • 📑 I have documented new code with YARD.
  • 🛣️ I have opened a PR to update the guides.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

rainerdema avatar Jun 07 '23 11:06 rainerdema

I'm putting this on hold until we figure out a few things on how it will be used in the new admin dashboard.

elia avatar Sep 12 '23 08:09 elia