I needed this to work with the Role Assign module. I found this ticket which mentions Role Assign integration which said to start a new ticket if someone was interested in this.
It appears that the only thing that needs to be adjusted to work with the Role Assign module is the JavaScript, so that it attaches the Role Expire fields to the Role Assign versions of the Role fields. I will attach a patch shortly.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | role_expire_2076363_role_assign_integration.patch | 1.41 KB | liam morland |
| #1 | role_assign_integration-2076363-1.patch | 1.09 KB | kpaxman |
Comments
Comment #1
kpaxman commentedPatch attached.
Comment #2
pokermoneyclips commentedI believe the initial call of
$(document).ready(function() {should be a Drupal.behaviors call per https://drupal.org/node/304258
applying patch at
Hunk #1 failed at 10
Hunk #2 failed at 24
against the latest dev build (2013-Oct-01)
Comment #3
liam morlandReroll.
Comment #4
liam morlandWe at University of Waterloo have been running this patch successfully for several years. Patch #3 applies cleanly as-of today.
Comment #5
kpaxman commentedBTW, it looks like at some point the "document ready" got replaced with Drupal behaviours upstream. (And at any rate, it was not introduced with this patch.)
Comment #6
rcodinaHave you tested the patch with latest dev from 9 Jan 2018?
Comment #7
liam morlandThe patch applies. It hasn't been deployed to production yet.
Comment #8
liam morlandThe patch continues to apply cleanly on 7.x-1.0-rc3.
Comment #9
sgdev commentedWe need to coordinate on this. It conflicts with what Role Delegation needs: https://www.drupal.org/project/role_expire/issues/1899606#comment-12727001
Role Delegation relies on
#edit_roles_changewhile Role Assign uses#edit_roleassignRole Delegation is about 3x more popular than Role Assign, so we need to support both.
Comment #10
sgdev commentedI think I have an easy way to incorporate this. Take a look at the new patch I've created: https://www.drupal.org/project/role_expire/issues/1899606#comment-12727684
I believe all that is necessary to incorporate your patch is an extra
elsespecifically for#edit-roleassign-roles. Everything else matches with the previous changes made for Role Delegation.I don't have the Role Assign module installed, but please test and tell me if there are any problems, especially with the checkboxes. Thanks.
Comment #11
liam morlandAre you saying this new patch should work as-is or that an extra
elsestill needs to be added?Comment #12
sgdev commentedI'm saying the patch in #3 is incorporated into the newest patch for #1899606. No need for it.
From a clean version of Role Expire, apply the patch in #1899606 and it should work for Role Assign. If it doesn't, let me know.
Comment #13
kpaxman commentedRole expiries now show up with Role Expire and Role Assign enabled - however, they all show up at the beginning, separate from the roles themselves; additionally, all roles appear and are therefore can be set to expire, not just the ones the user has access to through Role Assign. I'm fiddling now to see if I can modify my patch from this queue.
Comment #14
kpaxman commentedI now have a patch but it turns out it's more related to the ticket that this is closed as a duplicate of. (https://www.drupal.org/project/role_expire/issues/1899606)