pkp / pkp-lib

The library used by PKP's applications OJS, OMP and OPS, open source software for scholarly publishing.
https://pkp.sfu.ca
GNU General Public License v3.0
306 stars 445 forks source link

Journal Manager who is not Site Admin cannot change journal theme #8909

Closed asmecher closed 1 year ago

asmecher commented 1 year ago

Describe the bug Journal Managers who are not Site Administrators can't change the journal theme settings. They receive the message:

image

To Reproduce Steps to reproduce the behavior:

  1. Log in as a Journal Manager who is not an Admin (e.g. dbarnes in the test dataset)
  2. Go to Settings > Website > Appearance > Theme
  3. Save the form
  4. See error

What application are you using? OJS 3.3.0rc2

Additional information

This is caused by https://github.com/pkp/pkp-lib/pull/8610/files#diff-7c8f8752b8c8302fab60d70e7b5a0baea1944c323e9dbbb9468c391d9bb28f52R448.

ewhanson commented 1 year ago

Hey @asmecher, could you have a look at this? It was a quick, one line fix in pkp-lib. Thanks!

PRs:

asmecher commented 1 year ago

@ewhanson, a few lines up there's a hard requirement for $requestContext to be set; can you reconcile those two? https://github.com/pkp/pkp-lib/pull/8931/files#diff-7c8f8752b8c8302fab60d70e7b5a0baea1944c323e9dbbb9468c391d9bb28f52L439

bozana commented 1 year ago

@ewhanson, the 3.4 should come very soon, I think you solved this, so maybe to ping Alec to see it again, so that it can go into 3.4...

ewhanson commented 1 year ago

@asmecher, apologies for the delay on this. I've removed the redundant check for $requestContext and added an explicit check for the journal manager role. Could you have a look? Thanks!

asmecher commented 1 year ago

Looks good to me; please go ahead!

ewhanson commented 1 year ago

Merged, thanks!