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


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
Senior Librarian | Bibliothécaire titulaire
Digital Projects & Systems Development Librarian / Bibliothécaire des Projets Numériques & Développement de Systèmes
Concordia University / Université Concordia

Tel. / Tél. 514-848-2424 ext. / poste 7738
Email / courriel:
tomasz.neugebauer@concordia.ca

Mailing address / adresse postale: 1455 De Maisonneuve Blvd. W., LB-540-03, Montreal, Quebec H3G 1M8
Street address / adresse municipale: 1400 De Maisonneuve Blvd. W., LB-540-03, Montreal, Quebec H3G 1M8

library.concordia.ca