<div dir="ltr"><div>Hi Paul,</div><div><br></div><div>The permissions for the imaging_browser are fairly complex because of the interactions between all site/own site/project/entity type permissions.</div><div><br></div><div>If it's not production and you can modify the code, it might help to add error_log statements (which will print to your apache error log) in the function _hasAccess</div><div>in modules/imaging_browser/php/viewsession.class.inc in order to narrow down exactly part of the criteria is causing it to return false.</div><div><br></div><div>If you can't add debug statements, can you check:</div><div><br></div><div>1. Is the candidate a Human or Scanner entity type? (The query select Entity_type FROM session JOIN candidate USING (CandID) Where session.ID=2 will tell you)</div><div>2. What is the project and site of the session? (SELECT ProjectID, CenterID FROM session WHERE ID=2)</div><div>3. What permissions does the user have in user_perm_rel? (The ones required will vary based on the results of the above queries)</div><div>4. What sites does the user have in user_psc_rel?</div><div>5. Are you sure that the user ID of the user is "1" (since that was the only user_project_rel permission result in your query..)?<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 27, 2020 at 12:19 PM Paul Novak <<a href="mailto:pnovak2@uoregon.edu">pnovak2@uoregon.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div class="gmail-m_4546055541856370612WordSection1">
<p class="MsoNormal">I don’t understand what is meant by recent. This is a new installation using a released version.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">There is a single project and a single user.  The entire contents of user_project_rel are:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">select * from user_project_rel;<u></u><u></u></p>
<p class="MsoNormal">+--------+-----------+<u></u><u></u></p>
<p class="MsoNormal">| UserID | ProjectID |<u></u><u></u></p>
<p class="MsoNormal">+--------+-----------+<u></u><u></u></p>
<p class="MsoNormal">|      1 |         1 |<u></u><u></u></p>
<p class="MsoNormal">+--------+-----------+<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Paul<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-color:rgb(181,196,223) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12pt;color:black">From: </span></b><span style="font-size:12pt;color:black">Cecile Madjar <<a href="mailto:cecile.madjar@mcin.ca" target="_blank">cecile.madjar@mcin.ca</a>><br>
<b>Date: </b>Monday, July 27, 2020 at 9:01 AM<br>
<b>To: </b>Paul Novak <<a href="mailto:pnovak2@uoregon.edu" target="_blank">pnovak2@uoregon.edu</a>><br>
<b>Cc: </b>"<a href="mailto:loris-dev@bic.mni.mcgill.ca" target="_blank">loris-dev@bic.mni.mcgill.ca</a>" <<a href="mailto:loris-dev@bic.mni.mcgill.ca" target="_blank">loris-dev@bic.mni.mcgill.ca</a>><br>
<b>Subject: </b>Re: [Loris-dev] 403 Unauthorized when trying to use imaging_browser<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Hello Paul,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">does your admin user have access to all projects in the table user_project_rel? <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">In order for the user to see that page, it needs to have access to the project of the sessions. We recently added the project layer to LORIS so my guess would be that your admin user does not have the project of that session listed in his
 associated project in user_project_rel.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Hope this helps,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Cécile<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Mon, Jul 27, 2020 at 11:45 AM Paul Novak <<a href="mailto:pnovak2@uoregon.edu" target="_blank">pnovak2@uoregon.edu</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal"><span style="color:black">Hello,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:black"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:black">After uploading images using the imaging_uploader module, I am trying to view the images through the imaging browser (imaging_browser/viewSession/?sessionID=2).
 However, that page always returns 403 Unauthorized and displays a standard “You do not have access to this page” page. I am currently logged in as an admin user to LORIS and the list of permissions have all the permissions for imaging_browser module selected
 or enabled. The loris-error.log in /var/log/apache2/ doesn’t have any errors at the time I am trying to access this module. I am using LORIS 23.0.1.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:black"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:black">How can I view the images? What can I do to further troubleshoot this problem?</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:black"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:black">Paul</span><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
<p class="MsoNormal">_______________________________________________<br>
Loris-dev mailing list<br>
<a href="mailto:Loris-dev@bic.mni.mcgill.ca" target="_blank">Loris-dev@bic.mni.mcgill.ca</a><br>
<a href="https://urldefense.com/v3/__https:/mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev__;!!C5qS4YX3!RaUzKf_Ejz14svGcpy9OTpb33FxMa3Q_EYqoakIc0ZWCERS9DVPy5AAlZpVsQM0YeUQ$" target="_blank">https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev</a><u></u><u></u></p>
</blockquote>
</div>
</div>
</div>

_______________________________________________<br>
Loris-dev mailing list<br>
<a href="mailto:Loris-dev@bic.mni.mcgill.ca" target="_blank">Loris-dev@bic.mni.mcgill.ca</a><br>
<a href="https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev" rel="noreferrer" target="_blank">https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev</a><br>
</blockquote></div>