EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #09721
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
RE: [EP-tech] User Roles for Admin Screen Tab
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: RE: [EP-tech] User Roles for Admin Screen Tab
- From: Matthew Kerwin <matthew.kerwin@qut.edu.au>
- Date: Thu, 6 Jun 2024 23:46:43 +0000
CAUTION: This e-mail originated outside the University of Southampton.
Hi James, Forgive my rambling, I’m working through deep memories as I write: If I recall correctly, user_roles.pl by default defines two config items: 1. $c->{user_roles}, which associates a list of tokens with each role. Those tokens (things like “edit-own-record” or “staff-view”) are each an alias for a list of specific actions defined in $PRIVMAP in EPrints/DataObj/User.pm (“staff-view” has things
like “eprint/inbox/view”, “eprint/search/staff”, etc.) And each one of those specific actions is asserted in the code using a check like: $user->allow( "eprint/search/staff" ); #OR $user->allow("eprint/inbox/view", $eprint); 2. $c->{roles} to define new repo-specific tokens/actions; for example in our repo we have: $c->{roles}->{indexer} = [qw{ indexer/stop indexer/start indexer/force_start }]; # AND $c->{user_roles}->{repo_manager} = [qw{ … indexer … }]; So working at it from the bottom up: * in your screen plugin you’d have a test for: $user->allow("config/aam_update") * in your $c->{roles} you’d define a new hat like: $c->{roles}->{aam-update} = [qw{ config/aam_update }]; * in your $c->{user_roles} you’d do something like: push(@{$c->{user_roles}->{admin}}, "aam-update"); Does that help? Cheers --
From: eprints-tech-request@ecs.soton.ac.uk <eprints-tech-request@ecs.soton.ac.uk>
On Behalf Of James Kerwin CAUTION: This e-mail originated outside the University of Southampton. CAUTION: This e-mail originated outside the University of Southampton. Hi All, I've been
removed from my ongoing work to do the repository/server upgrade. On the old repo
ZjQcmQRYFpfptBannerStart
ZjQcmQRYFpfptBannerEnd CAUTION: This
e-mail originated outside the University of Southampton. CAUTION: This
e-mail originated outside the University of Southampton. Hi All, On the old repo I made a custom plugin for myself (admin) and team (editors) to run an AAM updates script by pushing a button. At the time I couldn't work out how to add this to
user_roles.pl so I was improper and edited: /opt/eprits3/perl_lib/EPrints/DataObj/User.pm "config/aam_update", Can anyone advise on the syntax to use to add this to
user_reoles.pl? I would like this fresh start to have everything done properly, but this is starting to hold up my upgrade and I'm edging towards editing User.pm again. For more info, the new tab is on the screen where you go to the Admin section repo_urlcgi/users/home?screen=Admin where we have "Editorial Tools, System Tools and Config Tools". The button exists under a tab named "Misc. Tools". Thanks, James |
- References:
- [EP-tech] User Roles for Admin Screen Tab
- From: James Kerwin <jkerwin2101@gmail.com>
- [EP-tech] User Roles for Admin Screen Tab
- Prev by Date: [EP-tech] User Roles for Admin Screen Tab
- Next by Date: [EP-tech] Changing path in IRStat2 for multiple repo in one vhost
- Previous by thread: [EP-tech] User Roles for Admin Screen Tab
- Next by thread: Re: [EP-tech] User Roles for Admin Screen Tab
- Index(es):