OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Denied access message for registered users

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Denied access message for registered users

Postby btbell » Thu Mar 14, 2013 6:11 am

All,

Sometimes when first logging in, the log in credentials are accepted, but the user is taken to a page that reads “You have been denied access. Access to this site is currently restricted.”

Image

However, the user is then able to navigate away from this page to view the site and the published content. This error has been reproduced in OJS versions 2.3.6 and 2.3.8. We are able to reproduce the error about 90% of the time. The settings in section 4.1 of the Journal Management Setup pages are as follows:
Users must be registered and log in to view the journal site = Yes
Users must be registered and log in to view open access content = Yes
btbell
 
Posts: 16
Joined: Tue Nov 06, 2012 1:19 pm

Re: Denied access message for registered users

Postby asmecher » Thu Mar 14, 2013 8:49 am

Hi Brian,

When you're viewing the login page, check for a "redirect" parameter. If one is supplied, then OJS will redirect the user to that URL after the login completes. (This will have been generated by the page that sent you to the login form in the first place.) If that redirect specifies e.g. a Journal Manager page, and the account you log into is only an Author account, then you can expect to see an "access denied" message.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8466
Joined: Wed Aug 10, 2005 12:56 pm

Re: Denied access message for registered users

Postby bdgregg » Fri Jan 03, 2014 2:44 pm

Alec,

I see where the problem is, I can replicate and fix it by changing the URL, but I'm not sure what is actually setting this to go the wrong page. I will try to explain. Keep in mind that this is 2.3.8 and I know it has been a while since we have gone over this but it has reared it's head again and I have journal that is not happy with this not working properly.

So on a journal where viewing the content is restricted to a logged in user, (must be logged in to view content) and you are not logged on the user would click on the "Current" link to the current issue which is the following URL: http://journal.dns.name.org/ojs/index.p ... ue/current

The site would redirect (a few times) and point the user to this next page to login:
http://journal.dns.name.org/ojs/index.p ... SiteAccess
Which brings up the login page as expected.
However, the page source now shows the hidden variable set to "/ojs/index.php/journal/user/authorizationDenied?message=user.authorization.restrictedSiteAccess" instead of "/ojs/index.php/journal/issue/current" as I would have expected.

The user would then enter their login and password and of course goes to the following page /ojs/index.php/journal/user/authorizationDenied?message=user.authorization.restrictedSiteAccess which is incorrect.

The user should be taken to the page /ojs/index.php/journal/issue/current as should have been indicated on the first click above.

If I manually change the source parameter to %2Fojs%2Findex.php%2Fjournal%2Fissue%2Fcurrent after clicking on the "Current" link on the first click all goes well and I am redirected to the correct page.

Somewhere along the lines in the redirection it seems that "source" is being replaced with the wrong page. I'm not certain as to where to fix this at as the login function seems to be a bit in both lib/pkp as well as in the ojs tree. I'm willing to try some changes but I'm not quite sure where to make some changes at this point.

I'll continue looking to see if I can follow the logic and find anything that stands out but thought you or one of the other guys would have a suggestion as to where to pinpoint my efforts.

Thanks,

Brian Gregg.
bdgregg
 
Posts: 117
Joined: Wed Sep 15, 2004 8:21 am
Location: University of Pittsburgh

Re: Denied access message for registered users

Postby asmecher » Mon Jan 06, 2014 11:21 am

Hi Brian,

Just to clarify -- clicking http://journal.dns.name.org/ojs/index.php/journal/issue/current redirects you to http://journal.dns.name.org/ojs/index.php/journal/login?source=%2Fojs%2Findex.php%2Fjournal%2Fuser%2FauthorizationDenied%3Fmessage%3Duser.authorization.restrictedSiteAccess? Can you PM me the URL to your installation so I can have a look at the redirects involved?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8466
Joined: Wed Aug 10, 2005 12:56 pm

Re: Denied access message for registered users

Postby asmecher » Mon Jan 06, 2014 11:58 am

Hi Brian,

I've double-checked and have replicated the behavior in OJS 2.3.8; also checking OJS 2.4.2, the behavior you describe no longer applies. The redirect goes right to the login page and doesn't result in the user being sent to the access denied page. A quick look didn't turn up the commit in which the behavior changed -- the OJS 2.3.x and 2.4.x branches are quite divergent -- but if it's at all possible I'd suggest upgrading to OJS 2.4.x rather than trying to beat down the bug itself.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8466
Joined: Wed Aug 10, 2005 12:56 pm

Re: Denied access message for registered users

Postby bdgregg » Mon Jan 06, 2014 12:04 pm

Alec,

Ok, I'll see how our journal managers feel about the upgrade. Again, thanks for looking into this.

Brian.
bdgregg
 
Posts: 117
Joined: Wed Sep 15, 2004 8:21 am
Location: University of Pittsburgh


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 1 guest