EPrints Technical Mailing List Archive
Message: #02027
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Re: Special editor role.
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Re: Special editor role.
- From: Mark Gregson <mark.gregson@qut.edu.au>
- Date: Wed, 19 Jun 2013 11:32:04 +1000
Hi Joel You can create new user types/roles quite easily and assign roles/hats and privileges to them. The roles can be existing ones (look at $PRIVMAP in DataObj::User) or new ones with custom lists of privileges. It's probably all explained better at http://wiki.eprints.org/w/User_roles.pl For your scenario, I think you would have to copy the 'editor' role from DataObj::User into user_roles.pl and replace the ':editor' part of the listed privileges with ':owner'. Then copy the 'user' user type in user_roles.pl to create your 'editor-like' user type and add the new role you created in the first step. Essentially you want something like this in user_roles.pl: # Same as user plus the 'edit-own-eprints' role $c->{user_roles}->{special_editor} = [qw{ general edit-own-record saved-searches set-password deposit change-email edit-own-eprints }]; # Modified copy of DataObj::User::$PRIVMAP->{editor} $c->{roles}->{edit-own-eprints} = [ "eprint/buffer/view:owner", "eprint/buffer/export:owner", "eprint/buffer/summary:owner", "eprint/buffer/export:owner", "eprint/buffer/details:owner", "eprint/buffer/history:owner", "eprint/buffer/messages:owner", "eprint/buffer/issues:owner", "eprint/buffer/remove_with_email:owner", "eprint/buffer/reject_with_email:owner", "eprint/buffer/move_inbox:owner", "eprint/buffer/move_archive:owner", "eprint/buffer/use_as_template:owner", "eprint/buffer/derive_version:owner", "eprint/buffer/edit:owner", "eprint/buffer/takelock:owner", # ... # full list excluded for brevity ]; You’ll need some additional phrases for the new user role. Cheers Mark Mark Gregson | Applications and Development Team Leader -----Original Message----- Hi, I was wondering whether if would be possible to define a new "editor role" into EPrints that allows a person with that role to be able to move to the repository his own publications (as well as edit them once they're into the live archive) but without messing with others publications? Regards -- Joel Rosental R. System Administrator Tel: +34 91 481 69 87 Web: http://www.networks.imdea.org *** 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] Special editor role.
- From: "Joel Rosental R." <joel.rosental@imdea.org>
- [EP-tech] Special editor role.
- Prev by Date: [EP-tech] IRStats2 Beta
- Next by Date: [EP-tech] Re: {Disarmed} Re: Re: IRStats2 Beta
- Previous by thread: [EP-tech] Special editor role.
- Next by thread: [EP-tech] Rezing name fields not working, bug?
- Index(es):