[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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 at ecs.soton.ac.uk 
> [mailto:eprints-tech-bounces at ecs.soton.ac.uk] *On Behalf Of *Tomasz 
> Neugebauer via Eprints-tech
> *Sent:* 03 August 2022 21:50
> *To:* eprints-tech at 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 at ecs.soton.ac.uk 
> <eprints-tech-bounces at ecs.soton.ac.uk> *On Behalf Of *Tomasz 
> Neugebauer via Eprints-tech
> *Sent:* August 3, 2022 4:14 PM
> *To:* eprints-tech at 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:https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cb6ba052819134be341a608da759d4c12%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637951615680233149%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=Lka459C1fo%2FbNqKhs4NmvQH1wZl%2FXJlqb3ATWc6aTds%3D&amp;reserved=0
> *** EPrints community wiki:https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cb6ba052819134be341a608da759d4c12%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637951615680233149%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=1p0ZAtZzPDv%2BSMz8mNgOflRR%2FcsBRMbtPVI%2B1chW73w%3D&amp;reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20220803/4cbc97a5/attachment.html