<html><body>
<p><font size="2" face="sans-serif">Hi,</font><br>
<br>
<font size="2" face="sans-serif">from a point of view of security, I don't think that JavaScript is a good way, since it can be turned off or changed browser side.</font><br>
<br>
<font size="2" face="sans-serif">There is the undocument variable $STAFF_ONLY that can be used in EPScript und EPrints Control Format (EPC). </font><br>
<br>
<font size="2" face="Menlo-Regular">&lt;epc:if test=&quot;$STAFF_ONLY = 'TRUE'&quot;&gt;</font><font size="2" face="sans-serif">display something here&lt;/epc:if&gt;</font><br>
<br>
<font size="2" face="sans-serif">It is mentioned in </font><a href="http://wiki.eprints.org/w/How_to_control_eprint_workflow_based_on_a_user_field"><font size="2" face="sans-serif">http://wiki.eprints.org/w/How_to_control_eprint_workflow_based_on_a_user_field</font></a><font size="2" face="sans-serif">&nbsp;(in the workflow description at the bottom), but not explained there.</font><br>
<br>
<font size="2" face="sans-serif">In my opinion, that variable (and possible other system variables) should be documented in </font><br>
<br>
<a href="http://wiki.eprints.org/w/EPScript"><font size="2" face="sans-serif">http://wiki.eprints.org/w/EPScript</font></a><br>
<br>
<font size="2" face="sans-serif">Best regards,</font><br>
<br>
<font size="2" face="sans-serif">Martin</font><br>
<br>
<font size="2" face="sans-serif">--</font><br>
<font size="2" face="sans-serif">Dr. Martin Brändle</font><br>
<font size="2" face="sans-serif">Zentrale Informatik</font><br>
<font size="2" face="sans-serif">Universität Zürich</font><br>
<font size="2" face="sans-serif">Stampfenbachstr. 73</font><br>
<font size="2" face="sans-serif">CH-8006 Zürich</font><br>
<br>
<br>
<img width="16" height="16" src="cid:1__=4EBBF5FFDFA35A178f9e8a93df9@lotus.uzh.ch" border="0" alt="Inactive hide details for Andrew Collington ---01/03/2016 14:16:18---Hi all, Is there something set up in ePrints that allows y"><font size="2" color="#424282" face="sans-serif">Andrew Collington ---01/03/2016 14:16:18---Hi all, Is there something set up in ePrints that allows you to get user details (such as type/role,</font><br>
<br>
<font size="1" color="#5F5F5F" face="sans-serif">Von:        </font><font size="1" face="sans-serif">Andrew Collington &lt;a.p.collington@sussex.ac.uk&gt;</font><br>
<font size="1" color="#5F5F5F" face="sans-serif">An:        </font><font size="1" face="sans-serif">&quot;eprints-tech@ecs.soton.ac.uk&quot; &lt;eprints-tech@ecs.soton.ac.uk&gt;</font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Datum:        </font><font size="1" face="sans-serif">01/03/2016 14:16</font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Betreff:        </font><font size="1" face="sans-serif">[EP-tech] Access user via javascript?</font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Gesendet von:        </font><font size="1" face="sans-serif">eprints-tech-bounces@ecs.soton.ac.uk</font><br>
<hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br>
<br>
<br>
<font size="2" face="Calibri">Hi all,</font><br>
<font size="2" face="Calibri">&nbsp;</font><br>
<font size="2" face="Calibri">Is there something set up in ePrints that allows you to get user details (such as type/role, email, etc.) via javascript? &nbsp;I did have a look through the auto.js file but didn’t see anything, though given the size of that file it’d be very easy for me to miss something obvious!</font><br>
<font size="2" face="Calibri">&nbsp;</font><br>
<font size="2" face="Calibri">The reason I ask is that I want to show a section in the abstract details only to admins (which is currently set up in cfg/citations/eprint/control.xml). &nbsp;I originally tried to modify that section, but with the caching it obviously didn’t work. &nbsp;I then tried to use a pin but had the same problems. &nbsp;Someone responded to my original EPrints UK User Group post (</font><a href="https://groups.google.com/forum/#!topic/eprints-uk-user-group/LloconUdLDg"><font size="2" color="#0563C1" face="Calibri"><u>https://groups.google.com/forum/#!topic/eprints-uk-user-group/LloconUdLDg</u></font></a><font size="2" face="Calibri">) suggesting that js may be a good way forward.</font><br>
<font size="2" face="Calibri">&nbsp;</font><br>
<font size="2" face="Calibri">If there’s not something already available then I could update the main template to include a json object of the user details which I can then use later on in the page. &nbsp;But hopefully someone else has already tried to add/show content dynamically based on role (or any other user property, I imagine) and can give some advice.</font><br>
<font size="2" face="Calibri">&nbsp;</font><br>
<font size="2" face="Calibri">Many thanks,</font><br>
<font size="2" face="Calibri">&nbsp;</font><br>
<font size="2" face="Calibri">Andy</font><br>
<font size="2" face="Calibri">&nbsp;</font><br>
<font size="2" face="Calibri">-- <br>
Andrew Collington<br>
Web Programmer, ITS Client Services<br>
ITS-CS Shawcross, University of Sussex, Falmer, Brighton, BN1 9QT<br>
<br>
T: (01273) 872591 (ext. 2591)<br>
E: </font><a href="mailto:a.p.collington@sussex.ac.uk"><font size="2" color="#0000FF" face="Calibri"><u>a.p.collington@sussex.ac.uk</u></font></a><br>
<font size="2" face="Calibri">&nbsp;</font><tt><font size="2">*** Options: </font></tt><tt><font size="2"><a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a></font></tt><tt><font size="2"><br>
*** Archive: </font></tt><tt><font size="2"><a href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a></font></tt><tt><font size="2"><br>
*** EPrints community wiki: </font></tt><tt><font size="2"><a href="http://wiki.eprints.org/">http://wiki.eprints.org/</a></font></tt><tt><font size="2"><br>
*** EPrints developers Forum: </font></tt><tt><font size="2"><a href="http://forum.eprints.org/">http://forum.eprints.org/</a></font></tt><tt><font size="2"><br>
</font></tt><br>
</body></html>