BiologicalRecordsCentre / UKBMS-online

Issue tracking for UKBMS online recording site
2 stars 0 forks source link

masquerading and logging in/out since yesterday #245

Closed IanMiddlebrook closed 2 years ago

IanMiddlebrook commented 2 years ago

Hi @BirenRathod @DavidRoy

Since the update to Drupal 9 yesterday (assuming that happened), a couple of strange things have happened.

Firstly, every time I log in I now need to agree to the terms & conditions of the website. I thought we only needed to do that when registering for a new account?

Secondly, and more importantly, I'm now unable to Masquerade as a different User. Each time I try, I just get logged out of the website.

Thanks,

Ian

BirenRathod commented 2 years ago

@IanMiddlebrook @DavidRoy I have enabled the accept terms and condition mandatory for login & new users. So Anybody whose got a admin role can't able to Masquerade. I have now exempted admin, so you could able to masquerade.

Also, I have now disabled to agree terms & condition, so should be fine. That means this will only occur for new registration.

IanMiddlebrook commented 2 years ago

That's great - thanks @BirenRathod

IanMiddlebrook commented 2 years ago

Hi @BirenRathod

Sorry, I've just tested this properly, but I'm still not able to Masquerade as a normal User or a Branch Co-ordinator. I've only been able to masquerade as another Admin user.

Thanks,

Ian

BirenRathod commented 2 years ago

@IanMiddlebrook This only happens if user hasn't been accepted the terms & condition yet after migration on Drupal 9. So you can remind that user to sign into their account and accept it.

I have implemented this now. So you can masquerade most users which had assigned for branch coordinator, verifier or admin roles. For general users, you still need to remind them to accept terms and condition first once logged in.

This new future introduced by new legal module. One benefit is you can keep the records of all version of terms & condition. Other is like stop letting log in if user hasn't accepted terms & condition. Also stop spam users of accessing the site.

IanMiddlebrook commented 2 years ago

Hi @BirenRathod I thought the 'terms & conditions' was only going to crop up at registration, not on log in. Is it not possible to mark all existing users as having accepted these (carried over from the previous Drupal version)? or have the terms & conditions changed?

Thanks,

Ian

BirenRathod commented 2 years ago

@IanMiddlebrook It is not how legal module works. Here is the link -> https://www.drupal.org/project/legal for more details. Although, Once users accepted, it will not ask them to accept it again and I will find out the solution for users registered in Drupal 8. Terms & condition hasn't changed yet, if that is the case, it will ask again all users to accept it again but because I have introduced this module to use in Drupal 9, this is why it has started to ask again to accept it.

BirenRathod commented 2 years ago

@IanMiddlebrook I have updated the records of all users for their terms and conditions who has registered in Drupal 8. So should be fine you to masquerade any users.

IanMiddlebrook commented 2 years ago

Thanks @BirenRathod
I've not come across any more issues with this. Best wishes, Ian