openlibrary icon indicating copy to clipboard operation
openlibrary copied to clipboard

Replace: Cleanup use of is_usergroup_member('/usergroup/librarians')

Open QuantuM410 opened this issue 10 months ago • 4 comments

Closes #9087

Replaces the existing is_usergroup_member('/usergroup/librarians') with is_librarian()

Technical

Testing

  • Given below are the affected paths, the testing has been done and all seems to work similarly
  • /admin/*
  • /search/?q=the&mode=everything (any search path /search/*)
  • /authors/merge (test url: http://localhost:8080/authors/merge?key=OL21093A&key=OL161167A&key=OL19677A&key=OL24638A&key=OL114411A&key=OL20585A&key=OL50694A&key=OL47908A&key=OL29586A&key=OL2688089A&key=OL29388A)
  • /authors/* (http://localhost:8080/authors/OL22098A/Lewis_Carroll)

Screenshot

Stakeholders

@RayBB

QuantuM410 avatar Apr 19 '24 13:04 QuantuM410

Fantastic! Want to make a separate issue for cleaning up the super librarians version of this? (And if there are others we can probably do them too)

Now need staff sign off

Sure! I m up for it :) I looked into other usergroups being used like the old is_usergroup method and it seems like its only with the case of super-librarians with an exception being is_usergroup_member('/usergroup/ia'). It also doesn't seem to have a method in User class in models.py

QuantuM410 avatar Apr 19 '24 15:04 QuantuM410

Thank you @RayBB and @QuantuM410 -- staging on testing and then we can merge once it succeeds.

mekarpeles avatar Apr 22 '24 19:04 mekarpeles

@mekarpeles do you consider it successful now? Not sure if that's why it was removed from testing.

RayBB avatar Apr 23 '24 09:04 RayBB

@mekarpeles can this be merged now?

RayBB avatar May 08 '24 11:05 RayBB