EPrints Technical Mailing List Archive
Message: #07501
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Restricting access to CGI Scripts
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>, "Francis Jayakanth" <fjayakanth@gmail.com>
- Subject: Re: [EP-tech] Restricting access to CGI Scripts
- From: John Salter <J.Salter@leeds.ac.uk>
- Date: Sat, 29 Sep 2018 22:18:37 +0000
Hi Francis,
One solution would be to: copy the [EPRINTS_ROOT]/cgi/register file into [EPRINTS_ROOT]/archives/[ARCHIVEID]/cgi/
The archive version of the file will be used in preference to the global one. Edit this file, adding a test for the IP address e.g. if( $repo->remote_ip =~ m/^10\.11\.22\./ ) { #do the normal registration stuff already in the cgi script } else { # generate a 'you cannot register' page (or a 'you must be on the intranet to register' page) }
Another way to
do what you want would be to sub-class the Screen::Register plugin, and alter the 'allow_register' method - and use the same test as above - based on
$repo->remote_ip.
If it's useful, there is an option 'allow_web_signup' in [EPRINTS_ROOT]/archives/[ARCHIVEID]/cfg/cfg.d/registration.pl which turns the ability to register via the web interface on or off - but I don;t think you want this - as it would stop all registrations, not just external ones.
If that doesn't provide enough information, let me know and I'll provide some more details.
Cheers, John
From: eprints-tech-bounces@ecs.soton.ac.uk <eprints-tech-bounces@ecs.soton.ac.uk> on behalf of Francis Jayakanth via Eprints-tech <eprints-tech@ecs.soton.ac.uk>
Sent: 29 September 2018 17:55:14 To: eprints-tech@ecs.soton.ac.uk Subject: [EP-tech] Restricting access to CGI Scripts Hi, I would like to restrict access to the 'Create Account' link of
our repository to the intranet users only. Can Someone who has implemented it, share the details, please? Thanks and regards, Francis *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** Archive: MailScanner has detected a possible fraud attempt from "emea01.safelinks.protection.outlook.com" claiming to be http://www.eprints.org/tech.php/ *** EPrints community wiki: MailScanner has detected a possible fraud attempt from "emea01.safelinks.protection.outlook.com" claiming to be http://wiki.eprints.org/ *** EPrints developers Forum: MailScanner has detected a possible fraud attempt from "emea01.safelinks.protection.outlook.com" claiming to be http://forum.eprints.org/ |
- Follow-Ups:
- Re: [EP-tech] Restricting access to CGI Scripts
- From: John Salter <J.Salter@leeds.ac.uk>
- Re: [EP-tech] Restricting access to CGI Scripts
- References:
- [EP-tech] Restricting access to CGI Scripts
- From: Francis Jayakanth <fjayakanth@gmail.com>
- Re: [EP-tech] Restricting access to CGI Scripts
- From: John Salter <J.Salter@leeds.ac.uk>
- [EP-tech] Restricting access to CGI Scripts
- Prev by Date: [EP-tech] Restricting access to CGI Scripts
- Next by Date: Re: [EP-tech] Restricting access to CGI Scripts
- Previous by thread: [EP-tech] Sort view with creators_name and corp_creators
- Index(es):