backdrop-contrib / simplesamlphp_auth

Support SAML for authentication of users. The module will auto-provision user accounts and dynamically assign roles in Backdrop CMS if you want it to.
https://backdropcms.org/project/simplesamlphp_auth
GNU General Public License v2.0
2 stars 3 forks source link

Undefined constant "BACKDROP_AUTHENTICATED_RID" #2

Closed kreynen closed 1 year ago

kreynen commented 2 years ago

https://github.com/backdrop-contrib/simplesamlphp_auth/blob/1.x-1.x/simplesamlphp_auth.install#L13

We used https://www.drupal.org/project/noreqnewpass in D7 sites using SSO, so I understand why you'd want to remove a change own password. I just don't see how this line would actually accomplish this. I commented this line out and I'm seeing the configuration options I expect when using simplesamlphp_auth in D7 or D9.

argiepiano commented 2 years ago

Also, a side comment. As noted in the issue title, BACKDROP_AUTHENTICATED_RID doesn't exist in Backdrop. We don't use role ids, but rather machine names. Thus, the correct constant is BACKDROP_AUTHENTICATED_ROLE (function user_role_revoke_permissions() expects a role machine name).

argiepiano commented 2 years ago

Also change own password is not a permission that exists in Backdrop currently, so this line 13 doesn't really do anything.

The only instance I can find of that permission is the one created by the userprotect module

kreynen commented 1 year ago

Talked to @joelsteidl about this yesterday. Because this module is being used on sites with existing D7 databases and the Backdrop module uses the same namespace as the D7 module, the install isn't run on those projects.

This line is a direct port of https://git.drupalcode.org/project/simplesamlphp_auth/-/blob/7.x-3.x/simplesamlphp_auth.install#L13

I created a PR to remove that line.