Closed (fixed)
Project:
Commerce License
Version:
8.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 Nov 2020 at 17:45 UTC
Updated:
8 Aug 2024 at 20:34 UTC
Jump to comment: Most recent
Comments
Comment #2
rgnyldz commentedThis could be usefull, I also have a case where users can upgrade their licences. So the old one should be removed.
Comment #3
rszrama commentedUnfortunately, this is just not how the Role license type works. It exists to grant a role to a user upon license activation, not to revoke a secondary role. Your options are to create your own license type that supports this logic, react to license activation to toggle that secondary role in an event subscriber, or hook into some other means of observing when roles change to make it happen. It's possible the ECA module would have features to support this without code, but I haven't looked into it myself.