EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #08470
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Static Page - Log In
- To: <eprints-tech@ecs.soton.ac.uk>, James Kerwin <jkerwin2101@gmail.com>
- Subject: Re: [EP-tech] Static Page - Log In
- From: David R Newman <drn@ecs.soton.ac.uk>
- Date: Mon, 25 Jan 2021 09:52:42 +0000
Hi James,
I think the way to do this is unfortunately a bit of a hack you want to create a simple Screen Plugin like the one below:
package
EPrints::Plugin::Screen::PrivateNotice;
use EPrints::Plugin::Screen;
@ISA = ( 'EPrints::Plugin::Screen' );
use strict;
sub new
{
my( $class, %params ) = @_;
my $self = $class->SUPER::new(%params);
return $self;
}
sub can_be_viewed
{
my( $self ) = @_;
return $self->allow( "general" );
}
sub render_title
{
my( $self ) = @_;
my $name = "User";
return $self->html_phrase( "title" );
}
sub render
{
my( $self ) = @_;
return $self->html_phrase( "content" );
}
1;
use strict;
my $eprints = EPrints->new;
my $repository = $eprints->current_repository();
exit( 0 ) unless( defined $repository );
EPrints::ScreenProcessor->process(
session => $repository,
screenid => "PrivateNotice",
);
exit( 0 );
use EPrints::Plugin::Screen::PrivateNotice;
@ISA = ( 'EPrints::Plugin::Screen::PrivateNotice' );
use strict;
sub new
{
my( $class, %params ) = @_;
my $self = $class->SUPER::new(%params);
return $self;
}
CAUTION: This e-mail originated outside the University of Southampton.Hi All,
Hope we're all happy and healthy.
I've been given a task and one option to complete it is to display information on a static page in EPrints. Due to the potentially sensitive nature of the data I was wondering if it's possible to have a static page in EPrints that requires the user to be logged in to EPrints to see it?
I've had a quick look around and looked at all my ".xpage" files and I have no examples. I feel like it isn't possible, but thought it would be best to ask.
If it isn't possible I have some other approaches to take. They will just take longer and my brain is already a bit scrambled after working out the LibCal API.
Thanks,James
*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** Archive: http://www.eprints.org/tech.php/ *** EPrints community wiki: http://wiki.eprints.org/
- References:
- [EP-tech] Static Page - Log In
- From: James Kerwin <jkerwin2101@gmail.com>
- [EP-tech] Static Page - Log In
- Prev by Date: Re: [EP-tech] Help indexing phrases
- Next by Date: Re: [EP-tech] Static Page - Log In
- Previous by thread: [EP-tech] EPrints/CRIS
- Next by thread: [EP-tech] DOI handling in orcid_support_advance
- Index(es):