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.


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
Library eServices | Queensland University of Technology
Level 3 | R Block | Kelvin Grove Campus | GPO Box 2434 | Brisbane 4001
Phone: +61 7 3138 3782 | Web:
http://eprints.qut.edu.au/
ABN: 83 791 724 622
CRICOS No: 00213J

 

 

 

-----Original Message-----
From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Joel Rosental R.
Sent: Tuesday, 18 June 2013 10:12 PM
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] Special editor role.

 

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/