Closed (fixed)
Project:
SAML Authentication
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
24 Jul 2019 at 14:54 UTC
Updated:
13 Jan 2021 at 22:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
antonnaviAdded first step of patch porting (only automatic default Drupal roles assignment implemented).
Be careful: It wasn't well tested yet.
Comment #3
antonnaviFixed setting account changed to changes be saved.
Comment #4
piggito commentedWe should filter values to only save the selected roles otherwise the user will have all roles available.
Attached patch fixes this issue
Comment #5
davidferlay commentedTested OK !
Comment #6
andypostComment #7
zeshan.ziya commentedAdded all role feature from d7 module except required role functionality.
1. Default role
2. Map role using saml attributes
Comment #8
andypost@zeshan.ziya please provide interdiff to follow what you changed from previous patch https://www.drupal.org/documentation/git/interdiff
PS sadly module has no test suite
Comment #9
zeshan.ziya commentedAhh, I din't apply any patch from here. i took code from https://www.drupal.org/project/samlauth and added role features.
Comment #10
andypostComment #11
andypostComment #12
andypostComment #13
rafaelferreir4 commentedAdding a new patch to be compatible with the new module updates.
Comment #14
rafaelferreir4 commentedComment #15
rafaelferreir4 commentedComment #16
rafaelferreir4 commentedComment #17
rafaelferreir4 commentedComment #20
roderikAlright. This issue was basically outstanding since the end of 2016, when droath contributed a completely rewritten branch which also had the basic role assignment in already. So it was up to me, to make sense of the various contributed patches.
I like the non-basic settings that zeshan.ziya contributed. I believe that includes functionality which many people will want, it will be enough for most people, and the configuration screen is still not too complicated. However
So I basically rewrote the thing. Result:

No tests yet for the event subscriber; that (like everything else) will likely wait until version 4.x. The form is standalone / independent of other logic flow, so if I'm wise, I'll make tests for that already. We'll see.
One extra thing I still want to implement: a checkbox for "Only take action on first login" (instead of every login). However, while coding that, I got convinced that the samlauth.user_sync event needs an extra property for that, indicating whether the account was just linked. I already committed the checkbox by accident, but it's doing nothing yet; will implement it soonish.