Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
The attached patch allows an admin to specify a set of roles that should always be forced onto https, regardless of which path they're accessing.
This allows you to (for instance) easily specify that all authenticated users should always use https.
Comment | File | Size | Author |
---|---|---|---|
#6 | 750104-securepages-by-role-6.patch | 3 KB | cafuego |
#3 | securepages-750104-3.patch | 2.97 KB | sime |
#2 | securepages-by-role-2.patch | 2.97 KB | cafuego |
#1 | securepages-by-role.patch | 3.03 KB | cafuego |
securepages-by-role.patch | 2.92 KB | cafuego |
Comments
Comment #1
cafuego CreditAttribution: cafuego commentedI boo-booed in the patch and left a debug statement in. Removed in this version.
This version also works and doesn't match user roles against roles for which https enforcement is not enabled.
Comment #2
cafuego CreditAttribution: cafuego commentedYet another version. I found array_filter(), so there's no need for a foreach() loop to clean up the enabled roles.
Comment #3
simeThis works, new rolled patch with a smidge more info for the admin form.
Comment #4
dboulet CreditAttribution: dboulet commentedWould like to see this implemented in 7.x as well.
Comment #5
izmeez CreditAttribution: izmeez commentedsubscribing
Comment #6
cafuego CreditAttribution: cafuego commentedMinimal effort to port the patch to 7.x-1.x
Comment #7
dboulet CreditAttribution: dboulet commentedPatch in #6 looks good to me.
Comment #8
grendzy CreditAttribution: grendzy commentedComment #9
khaled.zaidan CreditAttribution: khaled.zaidan commentedCan we expect this to be committed to both 6 and 7?
thx
Comment #10
grendzy CreditAttribution: grendzy commentedYes, I'm hoping to get this in the next release.
Comment #11
grendzy CreditAttribution: grendzy commentedWith a few edits, and added tests, this has been committed to 7.x: 4b8f953.
Moving to 6.x.
Comment #13
grendzy CreditAttribution: grendzy commentedCommitted to 6.x-2.x branch. http://drupalcode.org/project/securepages.git/commit/4634850