EPrints Technical Mailing List Archive
Message: #05453
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Antwort: Access user via javascript?
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: Re: [EP-tech] Antwort: Access user via javascript?
- From: "Alan.Stiles" <alan.stiles@open.ac.uk>
- Date: Fri, 4 Mar 2016 09:35:14 +0000
The issue doesn’t seem so much one of security (the standard access control on eprints will still stop unauthorised users from accessing
staff only areas) but rather one of hiding the buttons from those who don’t require them in the pre-built static abstract pages rather than the workflow. This means that you either have to rebuild the pages every time they are requested, which is heavy on
the server, especially once there are 5 or 6 spiders farming your site, or you use some _javascript_/jquery to hide or not hide the repository admin access buttons as appropriate. It was I who suggested that idea to Andrew on the user group list, with the belief that some aspect of the user profile was available
in JS. Assuming I was wrong on that front, would the best way to get that detail dynamically be an ajax call to a cgi function to return whether or not the user was an admin and, if not, hide the buttons (possibly requiring a surrounding ‘div’ or some such
on the elements to be hidden). That way the worst that happens if the script fails or JS is disabled is that the buttons are still visible, as they are currently? Any thoughts folks? Cheers, Alan From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
On Behalf Of martin.braendle@id.uzh.ch Hi,
|
- References:
- [EP-tech] Access user via javascript?
- From: Andrew Collington <a.p.collington@sussex.ac.uk>
- [EP-tech] Antwort: Access user via javascript?
- From: martin.braendle@id.uzh.ch
- [EP-tech] Access user via javascript?
- Prev by Date: [EP-tech] Antwort: Access user via javascript?
- Next by Date: Re: [EP-tech] Antwort: Access user via javascript?
- Previous by thread: [EP-tech] Antwort: Access user via javascript?
- Next by thread: Re: [EP-tech] Antwort: Access user via javascript?
- Index(es):