-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OJS] The current role does not have access to this operation -message needs more details on how to acquire the needed role #2297
Comments
This is a translation related solution, so tagging @mtub here. |
I'll continue the forum conversation about the "ideal" solution in a sec, but one expedient option might be to have this specific case use a different (more useful) locale key. That way you wouldn't need to modify the general-purpose one in a way that would be misleading for roles that can't be self-registered. |
Thanks, I will check |
sorry @asmecher but the authorization system in OJS is just too complicated for me to understand. Also I could not quite understand how the setAdvice is supposed to work :S I mean, I do not understand how this works: https://github.com/pkp/pkp-lib/blob/master/classes/security/authorization/AuthorizationDecisionManager.inc.php#L128-L135 If I add this
to here https://github.com/pkp/pkp-lib/blob/master/classes/security/authorization/RoleBasedHandlerOperationPolicy.inc.php#L39, nothing basically happens. What should happen, I think, is that the AUTHORIZATION_ADVICE_CALL_ON_DENY should override the default AUTHORIZATION_ADVICE_DENY_MESSAGE and the $callOnDeny should be passed as well, but I am still getting the same error message as before. I am clearly missing something here. |
@asmecher @NateWr I think that this could be fixed by making it easier for users to acquire the author role when it is missing. Can you check my last comment from September at some point so that I can move forward in implementing the new feature mentioned above. |
Personally, I don't think users should need to "acquire" the Author role at all. Unless a journal has shut down non-commissioned submissions (ie - by closing all registrations), any user should be able to initiate a submission. If they already have an Author role in any context, and they initiate a submission in another context, we should just take them to the submission page and make them select an Author-ish role as the first item in the submission form. |
Would this cause problems with things like GDPR? When I suggested that journal manager should be able to add roles for users from other journals, @bozana raised the question of GDPR and the fact that the user has to register the role herself for the related legistlation to be fulfilled. Or do you think that doing a submission can be regarded as a contract as such? I mean automatically add the role when the user starts to send a manuscript. Usability wise it would be a perfect solution imho. |
I am not a lawyer, but if the journals are all part of the same site (eg - Even if the journals are separate, though, it's hard to see what the difference would be. When a user makes a submission, to comply with GDPR the site would need to specify how their data is stored/used. If a role ID is one part of their submission data, it doesn't seem unique in that sense. |
Just tagging the other issue here: #3022 As you can see there, site admin can assign roles freely, but the journal managers can not. But this could just be an issue when someone else is doing something in your behalf. Actually Alec comments your suggestion here: https://forum.pkp.sfu.ca/t/ojs3-missing-author-roles-in-multi-journal-installations/28710/2 This lead me to think of a solution where clicking the "Make a new submission" which now just gives you a text saying " The current role does not have access to this operation. " would instead give you an easy way of adding an author role. And that is what was pursued above. |
I'd rather just get them started on their submission. They can select an Author role as part of the first form they submit in the process. Something like "Submitting as" with a select of Author roles (or, if only one |
That would probably mean changing some of the access policies in the form, but I do think that is a good idea to add those to the form. If @asmecher agrees I can try doing this during the weekend (while eating mämmi). |
Hi all, just a comment regarding data privacy: I think the problem is when someone else (e.g. journal manager or editor) does something for another person/user (and the user does not know about that i.e. does not agree i.e. does not have a chance to agree/disagree). I.e. it would need explicitly agreement of the user. If a user him/herself would like to do something, that is OK. |
Yes, but probably not for service providers using OJS as SaaS, where journals might appear at different domains with no indication of shared platform.
Yes, but for journals using the default role configuration (99% I'd guess) there will really only be a single author role allowing self-registration, so it's a moot point. I think we can choose the author role when there's only one, and prompt for the few remaining cases, and if the latter group finds it unworkable we can ask them for suggestions for improvement. |
I had to look that up -- happy Easter! |
So to sum up: Because the author is doing the selections, we are not running into trouble with GDPR. |
Yes, sounds great. This might mean excluding the first step of the submission wizard from requiring the author role, but OTOH we've done something like that elsewhere so there might be a pattern to follow. |
But @asmecher do check the AuthorizationDecisionManager code I mention above. Because if you look at line https://github.com/pkp/pkp-lib/blob/master/classes/security/authorization/AuthorizationDecisionManager.inc.php#L129 I can not understand how the |
I know this is not what we discussed. But while doing this change, I found this function that is already used in several places This seemed so perfect, that I created a pr based on that: #3542 If you still feel like we should give the authors a choice if there are several author roles, then I can do the additional changes needed. It is actually not much. Also I funny thing I noticed after I changed the policy so that users with no roles could access the submission form: there was already a secondary check there. When the author role was missing, the form showed this error: https://github.com/pkp/pkp-lib/blob/master/locale/en_US/submission.xml#L16 If you think that additional changes are not needed, then I do not think that locale key is needed anymore. But if you think we need the role selection, then I would use that same key just by removing the last sentence. What do you think. Also Alec, check my last comment as well. I am fairly sure that is a bug although this pr is not affected anymore. |
That sounds good to me. I won't be able to code review this until at least next week but happy to take a look then. |
No hurry from my part! |
Thanks! @asmecher, did you check the bug here: #2297 (comment) (not related to the pr anymore, but will most likely affect something else later) |
Check out https://github.com/pkp/pkp-lib/blob/master/classes/security/authorization/AuthorizationDecisionManager.inc.php#L228 -- the |
Thanks! |
@ajnyga, I just tried that and it did work for me. I suspect your policy tree is resulting in a |
I give up! Hopefully I do not have to work with the policies any time soon 🤣 |
@NateWr nevermind the conversation above, the pr above is ready for review whenever you have the time. |
FYI, I've taken over this PR and I'll roll it into changes related to #3575. |
This issue was address in a PR merged with #3575. |
A typical problem in multi-journal installations is that a user has registered to journal A and later want's to submit something to journal B as well. However, usually this is not possible, because the user does not have the author role in journal B.
I made a feature request about how OJS should handle this situation. http://forum.pkp.sfu.ca/t/ojs3-missing-author-roles-in-multi-journal-installations/28710
In my opinion having a simple button to enable the author role in that message would be ideal. However, I developed a quick fix where the message text has an additional link leading to the user profile/roles page. This will probably help in most cases. PR in a minute.
The text was updated successfully, but these errors were encountered: