EPrints Technical Mailing List Archive

Message: #09017


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

Re: [EP-tech] depositing user email in the Review table


Hi Tomasz,

I think John's suggestion of a virtual field is the easiest solution.  I added the following to eprint_fields.pl:

{
        name => 'user_email',
        virtual => 1,
        type => 'text',
        render_value => 'render_user_email',
},


Then added another file in my archive's cfg/cfg.d/ directory to define the render function (and added a phrase for the field name):

$c->{render_user_email} = sub
{
        my( $session, $field, $alllangs, $nolink, $value, $obj ) = @_;

        my $ds = $session->get_dataset( 'user' );
        my $user = $ds->dataobj( $obj->get_value( 'userid' ) );
        return $session->xml->create_text_node( $user->get_value( 'email' ) );
},

Regards

David Newman


On 03/08/2022 10:26 pm, John Salter via Eprints-tech wrote:
CAUTION: This e-mail originated outside the University of Southampton.

Hi Tomasz,
I think 'user/view' is the role you'd need to grant to editors to be able to see the profiles.

For the email address aspect (I haven't fully thought these through yet):

- there may be a way to change the Review screen to use a different citation style for the user (but you wouldn't want to change e.g. how it is rendered on the summary page)

- you could add a virtual field which rendered the email address (if added to the review columns, this column would not be sortable). Let me know if you want some example script for this.

- … (I feel there's an eprint 'trick' I'm overlooking here…)

 

Cheers,

John

 

From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Tomasz Neugebauer via Eprints-tech
Sent: 03 August 2022 21:50
To: eprints-tech@ecs.soton.ac.uk
Subject: Re: [EP-tech] depositing user email in the Review table

 

CAUTION: This e-mail originated outside the University of Southampton.

Another related question to this one, especially if it is not possible or easy to get the email address to appear in the Review Table:

Is there a specific permission/role that I could add to the editors so that they can view (but not modify) the Users Profile information?

Right now, only admins can see that info, editors see this:

You may not view this screen: Workflow::View.

and I would like to give the editors access as well, primarily for that email address.

 

Tomasz

 

From: eprints-tech-bounces@ecs.soton.ac.uk <eprints-tech-bounces@ecs.soton.ac.uk> On Behalf Of Tomasz Neugebauer via Eprints-tech
Sent: August 3, 2022 4:14 PM
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] depositing user email in the Review table

 

Attention This email originates from outside the concordia.ca domain. // Ce courriel provient de l'exterieur du domaine de concordia.ca

 

 

CAUTION: This e-mail originated outside the University of Southampton.

Is there any way to get the Depositing User’s email address visible as a column in the Review screen?

I can get the “Depositing User” name displayed in the review screen, and the name is clickable, but is there any way to get the email right into that review table to save having to click on the name to access the user metadata screen?

 

Tomasz

 

 


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