rubyforgood / human-essentials

Human Essentials is an inventory management system for diaper, incontinence, and period-supply banks. It supports them in distributing to partners, tracking inventory, and reporting stats and analytics.
https://humanessentials.app
MIT License
436 stars 449 forks source link

add role deactivation model attributes, methods and services #4382

Closed elasticspoon closed 3 days ago

elasticspoon commented 1 month ago

Issue #3587

Addressing this issue seems like it will take multiple PRs.

  1. a PR to add backend methods to activate and deactivate roles and query for those roles #4382
  2. another PR to replaces usage of has_role with has_active_role, etc. #4392
  3. another PR to change controllers and views to work with deactivation logic

This first PR adds the back-end changes needed to handle role deactivation: