EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #10319
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Custom Error Message for Screen Access / IRStats
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Custom Error Message for Screen Access / IRStats
- From: Tomasz Neugebauer <Tomasz.Neugebauer@concordia.ca>
- Date: Thu, 22 Jan 2026 16:53:40 +0000
|
CAUTION: This e-mail originated outside the University of Southampton.
Hi everyone,
I'm in the process of putting IRStats2 behind a login, and it's going well, but I've had nothing but failure in my attempts to customize the error message that the user receives when they attempt to access the stats without logging in. Right now, after adding
specific permissions for IRStats, something ike this:
push @{$c->{user_roles}->{user}}, "+irstats2/view";
push @{$c->{user_roles}->{user}}, "+irstats2/export";
and a custom $c->{irstats2}->{allow} = sub for IRStats, we can control the access, but the default error message when a user attempts to view the stats is not ideal, it's just the default:
Error: You may not view this screen: IRStats2::Report.
I would like to customize this message to say something informative (referring to a "screen" here is not exactly user friendly) for example, "Access to statistics is restricted to logged in users."
I have tried so many different ways to get that custom message to display, and nothing has worked!
I know that IRStats2 code has been updated recently, without a push to the bazaar, so I'm not entirely sure just how up-to-date our code is for that. I've been waiting for the bazaar version of the plugin, but perhaps that's not the best strategy. I doubt
that this is addressed in any of those recent commits, but let me know if it is.
Tomasz
________________________________________________
Tomasz Neugebauer
Tel. / Tél. 514-848-2424 ext. / poste 7738
Mailing address / adresse postale: 1455 De Maisonneuve Blvd. W., LB-540-03, Montreal, Quebec H3G 1M8 library.concordia.ca |
- Follow-Ups:
- Re: [EP-tech] Custom Error Message for Screen Access / IRStats
- From: David R Newman <drn@ecs.soton.ac.uk>
- Re: [EP-tech] Custom Error Message for Screen Access / IRStats
- Prev by Date: [EP-tech] Query for IRSTATS2 Download from Access Table
- Next by Date: Re: [EP-tech] Custom Error Message for Screen Access / IRStats
- Previous by thread: [EP-tech] Query for IRSTATS2 Download from Access Table
- Next by thread: Re: [EP-tech] Custom Error Message for Screen Access / IRStats
- Index(es):
