EPrints Technical Mailing List Archive

Message: #08507

< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] Ask about user roles


If you want to edit the permission of one specific user you can subtract a role from within their profile.  In the Account stage of the user workflow add this as a new role in the Roles section:


This means the user cannot delete any new EPrint records in their inbox.  Default settings for EPrints means regular users (not admin or editors) can only delete their own eprint records when they are in their inbox, so this settings will prevent them removing an eprint record in any scenario (technically you should also add -eprint/inbox/destroy:owner as another separate role, so the user's credentials cannot be used to delete their eprint records via the REST API).

If you want to prevent all regular users from being able to delete their own records when in their user inbox, then you need to make a local copy of flavours/pub_lib/cfg.d/user_roles.pl (or lib/cfg.d/user_roles.pl if running EPrints 3.3) in your archive's cfg/cfg.d/ directory and add the line:


at the bottom of the list of user roles for a user (i.e. $c->{user_roles}->{user}).  Once edited your will need to reload you webserver for the change to take effect.

I am not exactly sure what you mean by not being able to "to create items when the previously created item hasn't finished the review process" but I assume that effectively means a user should only be able to have one eprint item that is not yet live in the archive.  It is not possible, as far as I know, to set conditional permissions like this.  You could potentially modify the code to not display the "New Item" button (on the Manage deposits page) based on certain conditions like this.  However, I would generally advise against this.  As it may have unintended side effects or create issues when you want to upgrade.


David Newman

On 16/02/2021 01:17, Ajunk Pracetio via Eprints-tech wrote:
CAUTION: This e-mail originated outside the University of Southampton.

I want to ask about User Roles. Can the administrator restrict users from deleting items that have already been created? or restrict the user from being able to create items when the previously created item hasn't finished the review process?

Thank you.

Agung Prasetyo Wibowo.

*** 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/

Virus-free. www.avg.com