onelogin / drupal-saml

MIT License
14 stars 17 forks source link

Role mapping is not defined (aside from administrator and authenticated user) #16

Closed danny2p closed 9 years ago

danny2p commented 9 years ago

Role handling only accounts for Administrator and Authenticated user -- really should check all custom roles to work as expected by adding something like below (and appending other roles rather than overwriting $roles array for each declaration (in switch ($roleWeight) statement)

if ($loadedRole = user_role_load_by_name($samlRole)) { $roles[$loadedRole->rid] = $loadedRole->name; }

pitbulk commented 9 years ago

Hi @rehabllc

I developed several SAML plugins and I always try to add to them similar functionality and similar settings.

The group mapping management that I implemented here was based on this one: https://github.com/pitbulk/wordpress-onelogin/blob/master/onelogin-saml-sso/php/functions.php#L118

Do you have any Pull Request to share with us? I will be glad reviewing and adding the changes in our repo.

pitbulk commented 9 years ago

Solved, sorry for the delay.