/
User.pm
1597 lines (1146 loc) · 35.6 KB
/
User.pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
######################################################################
#
# EPrints::DataObj::User
#
######################################################################
#
#
######################################################################
=pod
=for Pod2Wiki
=head1 NAME
B<EPrints::DataObj::User> - Class representing a single user.
=head1 DESCRIPTION
This class represents a single eprint user record and the metadata
associated with it.
EPrints::DataObj::User is a subclass of EPrints::DataObj with the following
metadata fields (plus those defined in ArchiveMetadataFieldsConfig:
=head1 SYSTEM METADATA
=over 4
=item userid (int)
The unique ID number of this user record. Unique within the current repository.
=item rev_number (int)
The revision number of this record. Each time it is changed the revision
number is increased. This is not currently used for anything but it may
be used for logging later.
=item username (text)
The username of this user. Used for logging into the system. Unique within
this repository.
=item password (secret)
The crypted password for this user as generated by L<EPrints::Utils/crypt>.
This may be ignored if for example LDAP authentication is being used.
=item usertype (namedset)
The type of this user. The options are configured in metadata-phrases.xml.
=item newemail (email)
Used to store a new but as yet unconfirmed email address.
=item newpassword (secret)
Used to store a new but as yet unconfirmed password.
=item pin (text)
A code required to confirm a new username or password. This code is emailed
to the user to confirm they are who they say they are.
=item pinsettime (int)
When the pin code was set, so we can make it time out.
=item joined (time)
The date and time that the user account was created. Before EPrints 2.4 this
was a date field so users created before the upgrade will appear to have been
created at midnight.
=item email (email)
The email address of this user. Unique within the repository.
=item lang (namedset)
The ID of the preferred language of this user. Only really used in multilingual
repositories.
=item editperms (search, multiple)
This field is used to filter what eprints a staff member can approve and
modify. If it's unset then they can modify any (given the correct privs. but
if it is set then an eprint must match at least one of the searches to be
within their scope.
=item frequency (set)
Only relevant to staff accounts. Is the frequency they want to be mailed
about eprints matching their scope that are in editorial review. never,
daily, weekly or monthly.
=item mailempty (boolean)
Only relevant to staff accounts. If set to true then emails are sent
even if there are no items matching the scope.
=item preference (compound)
User preferences which need to be persistent (simple key-value pairs).
=back
=head1 METHODS
=over 4
=cut
package EPrints::DataObj::User;
@ISA = ( 'EPrints::DataObj' );
use EPrints;
use EPrints::Search;
use strict;
######################################################################
=pod
=item $field_info = EPrints::DataObj::User->get_system_field_info
Return an array describing the system metadata of the this
dataset.
=cut
######################################################################
sub get_system_field_info
{
my( $class ) = @_;
return
(
{ name=>"userid", type=>"counter", required=>1, import=>0, can_clone=>1,
sql_counter=>"userid" },
{ name=>"rev_number", type=>"int", required=>1, can_clone=>0,
default_value=>1 },
{ name=>"saved_searches", type=>"subobject", datasetid=>'saved_search',
multiple=>1 },
{ name=>"username", type=>"id", required=>1 },
{ name=>"password", type=>"secret", show_in_html=>0,
fromform=>\&EPrints::Utils::crypt_password },
{ name=>"usertype", type=>"namedset", required=>1,
set_name=>"user", input_style=>"medium", default_value=>"user" },
{ name=>"newemail", type=>"email", show_in_html=>0 },
{ name=>"newpassword", type=>"secret", show_in_html=>0,
fromform=>\&EPrints::Utils::crypt_password },
{ name=>"pin", type=>"text", show_in_html=>0 },
{ name=>"pinsettime", type=>"int", show_in_html=>0 },
{ name=>"joined", type=>"timestamp", required=>1 },
{ name=>"email", type=>"email", required=>1 },
{ name=>"lang", type=>"arclanguage", required=>0,
input_rows=>1 },
{ name => "editperms",
multiple => 1,
input_ordered => 0,
input_add_boxes => 1,
input_boxes => 1,
type => "search",
datasetid => "eprint",
fieldnames_config => "editor_limit_fields",
},
{ name => "roles", multiple => 1, type => "id", text_index=>0 },
{ name=>"frequency", type=>"set", input_style=>"medium",
options=>["never","daily","weekly","monthly"],
default_value=>"never" },
{ name=>"mailempty", type=>"boolean", input_style=>"radio",
default_value=>"FALSE" },
{ name=>"items_fields", type=>"fields", datasetid=>"eprint",
multiple=>1, input_ordered=>1, required=>1, volatile=>1 },
{ name=>"latitude", type=>"float", required=>0 },
{ name=>"longitude", type=>"float", required=>0 },
{
name => "preference",
type => "storable",
sql_index => 0,
text_index => 0,
volatile => 1,
},
)
};
######################################################################
=pod
=item $user = EPrints::DataObj::User->new( $session, $userid )
Load the user with the ID of $userid from the database and return
it as an EPrints::DataObj::User object.
=cut
######################################################################
sub new
{
my( $class, $session, $userid ) = @_;
return $session->get_database->get_single(
$session->dataset( "user" ),
$userid );
}
######################################################################
=pod
=item $user = EPrints::DataObj::User->new_from_data( $session, $data )
Construct a new EPrints::DataObj::User object based on the $data hash
reference of metadata.
Used to create an object from the data retrieved from the database.
=cut
######################################################################
sub new_from_data
{
my( $class, $session, $known ) = @_;
return $class->SUPER::new_from_data(
$session,
$known,
$session->dataset( "user" ) );
}
######################################################################
# =pod
#
# =item $user = EPrints::DataObj::User::create( $session, $user_type )
#
# Create a new user in the database with the specified user type.
#
# =cut
######################################################################
sub create
{
my( $session, $user_type ) = @_;
return EPrints::DataObj::User->create_from_data(
$session,
{ usertype=>$user_type },
$session->dataset( "user" ) );
}
######################################################################
# =pod
#
# =item $dataobj = EPrints::DataObj->create_from_data( $session, $data, $dataset )
#
# Create a new object of this type in the database.
#
# $dataset is the dataset it will belong to.
#
# $data is the data structured as with new_from_data.
#
# =cut
######################################################################
sub create_from_data
{
my( $class, $session, $data, $dataset ) = @_;
my $new_user = $class->SUPER::create_from_data( $session, $data, $dataset );
$new_user->update_triggers();
if( scalar( keys %{$new_user->{changed}} ) > 0 )
{
# Remove empty slots in multiple fields
$new_user->tidy;
# Write the data to the database
$session->get_database->update(
$new_user->{dataset},
$new_user->{data},
$new_user->{changed} );
}
$session->get_database->counter_minimum( "userid", $new_user->get_id );
return $new_user;
}
######################################################################
=pod
=item $dataset = EPrints::DataObj::User->get_dataset_id
Returns the id of the L<EPrints::DataSet> object to which this record belongs.
=cut
######################################################################
sub get_dataset_id
{
return "user";
}
######################################################################
=pod
=item $defaults = EPrints::DataObj::User->get_defaults( $session, $data )
Return default values for this object based on the starting data.
=cut
######################################################################
# inherrits
######################################################################
=pod
=item $user = EPrints::DataObj::User::user_with_email( $session, $email )
Return the EPrints::user with the specified $email, or undef if they
are not found.
=cut
######################################################################
sub user_with_email
{
my( $repo, $email ) = @_;
my $dataset = $repo->dataset( "user" );
$email = $repo->get_database->ci_lookup(
$dataset->field( "email" ),
$email
);
my $results = $dataset->search(
filters => [
{
meta_fields => [qw( email )],
value => $email, match => "EX"
}
]);
return $results->item( 0 );
}
######################################################################
=pod
=item $user = EPrints::DataObj::User::user_with_username( $session, $username )
Return the EPrints::user with the specified $username, or undef if
they are not found.
=cut
######################################################################
sub user_with_username
{
my( $repo, $username ) = @_;
my $dataset = $repo->dataset( "user" );
$username = $repo->get_database->ci_lookup(
$dataset->field( "username" ),
$username
);
my $results = $dataset->search(
filters => [
{
meta_fields => [qw( username )],
value => $username,
match => "EX"
}
]);
return $results->item( 0 );
}
######################################################################
=pod
=item $problems = $thing->validate
Validate the user - find out if all the required fields are filled
out, and that what's been filled in is OK. Returns a reference to an
array of problem descriptions.
If there are no probelms then the array is empty.
The problems are XHTML DOM objects describing the problem.
=cut
######################################################################
sub validate
{
my( $self, $for_archive, $workflow_id ) = @_;
$workflow_id = "default" if !defined $workflow_id;
my @problems;
my $user_ds = $self->{session}->get_repository->get_dataset( "user" );
my %opts = ( item=> $self, session=>$self->{session} );
my $workflow = EPrints::Workflow->new( $self->{session}, $workflow_id, %opts );
push @problems, $workflow->validate;
push @problems, @{ $self->SUPER::validate( $for_archive ) };
return( \@problems );
}
######################################################################
=pod
=item $user->commit( [$force] )
Write this object to the database.
If $force isn't true then it only actually modifies the database
if one or more fields have been changed.
=cut
######################################################################
sub commit
{
my( $self, $force ) = @_;
$self->update_triggers();
if( !defined $self->{changed} || scalar( keys %{$self->{changed}} ) == 0 )
{
# don't do anything if there isn't anything to do
return( 1 ) unless $force;
}
if( $self->{non_volatile_change} )
{
$self->set_value( "rev_number", ($self->get_value( "rev_number" )||0) + 1 );
}
if (exists $self->{changed}->{password})
{
$self->close_non_current_login_tickets;
}
my $success = $self->SUPER::commit( $force );
return( $success );
}
######################################################################
=pod
=item $user->close_non_current_login_tickets;
Close all tickets for the current user except the one
they're currently logged in on
=cut
######################################################################
sub close_non_current_login_tickets
{
my ($self) = @_;
my $repo = $self->repository;
my $current_ticket = $repo->current_loginticket;
my $ticket_ds = $repo->dataset('loginticket');
my $user_tickets = $ticket_ds->search(
filters => [ {meta_fields => ['userid'], value => $self->id} ]
);
$user_tickets->map(
sub
{
my ($repo, $ds, $ticket, $current_ticket) = @_;
if ($ticket->value('code') ne $current_ticket->value('code'))
{
$ticket->remove;
}
},
$current_ticket
);
}
######################################################################
=pod
=item $success = $user->remove
Remove this user from the database. Also, remove their saved searches,
but do not remove their eprints.
=cut
######################################################################
sub remove
{
my( $self ) = @_;
my $success = 1;
foreach my $saved_search ( $self->get_saved_searches )
{
$saved_search->remove;
}
# remove user record
my $user_ds = $self->{session}->get_repository->get_dataset( "user" );
$success = $success && $self->{session}->get_database->remove(
$user_ds,
$self->get_value( "userid" ) );
return( $success );
}
=item $bool = $user->is_staff()
Returns true if the user's type is B<editor> or B<admin>.
=cut
sub is_staff
{
my( $self ) = @_;
return $self->has_role( 'editor' ) || $self->has_role( 'admin' );
}
=item $lang = $user->langauge()
Get the preferred language of the user.
=cut
sub language
{
my( $self ) = @_;
my $langid = $self->value( "lang" );
my $lang = $self->{session}->get_repository->get_language( $langid );
return $lang;
}
=item $list = $user->owned_eprints_list( %opts )
Returns a L<EPrints::List> of all the L<EPrints::DataObj::EPrint>s owned by this user.
%opts is passed to a L<EPrints::Search> which is used to filter the results.
=cut
sub owned_eprints_list
{
my( $self, %opts ) = @_;
$opts{dataset} = $self->{session}->dataset( "eprint" ) if !defined $opts{dataset};
my $searchexp = $opts{dataset}->prepare_search( %opts );
# BACKWARDS COMPATIBILITY
# This method is predicated on doing an in-memory intersect of everything
# that the user "owns" and every eprint in the matching datasets
# If the user chose to show his 'live' eprints that could get really,
# really big
my $fn = $self->{session}->config( "get_users_owned_eprints" );
if( !defined $fn )
{
$searchexp->add_field( $opts{dataset}->field( "userid" ), $self->id );
return $searchexp->perform_search;
}
my $list = &$fn( $self->{session}, $self, $opts{dataset} );
if (!$searchexp->is_blank()) { $list = $list->intersect( $searchexp->perform_search ); }
return $list;
}
=item $list = $user->editable_eprints_list( %opts )
Returns a L<EPrints::List> of L<EPrints::DataObj::EPrint>s that match this user's editorial search expressions. If the user has no editorial scope a list of all eprints that match the given %opts is returned.
%opts is passed to a L<EPrints::Search> which is used to filter the results.
$list = $user->editable_eprints_list(
dataset => $repo->dataset( "buffer" ),
);
=cut
sub editable_eprints_list
{
my( $self, %opts ) = @_;
$opts{dataset} = $self->{session}->dataset( "eprint" ) if !defined $opts{dataset};
if( !$self->is_set( 'editperms' ) )
{
return $opts{dataset}->search(
custom_order => "-datestamp",
%opts );
}
my @conds;
my $editperms = $self->{dataset}->get_field( "editperms" );
foreach my $sv ( @{$self->get_value( 'editperms' )} )
{
push @conds, $editperms->make_searchexp(
$self->{session},
$sv )->get_conditions;
}
my $cond = EPrints::Search::Condition->new( "OR", @conds );
# Condition::process() doesn't check dataset filters, so manually
# add them here
$opts{filters} = [] if !defined $opts{filters};
push @{$opts{filters}}, $opts{dataset}->get_filters;
if( EPrints::Utils::is_set( $opts{filters} ) )
{
my $searchexp = $opts{dataset}->prepare_search( %opts );
$cond = EPrints::Search::Condition->new( "AND",
$searchexp->get_conditions,
$cond );
}
my $ids = $cond->process( session => $self->{session}, dataset => $opts{dataset} );
return EPrints::List->new(
session => $self->{session},
dataset => $opts{dataset},
ids => $ids,
order => "-datestamp" );
}
######################################################################
=pod
=item $boolean = $user->has_owner( $possible_owner )
True if the users are the same record.
=cut
######################################################################
sub has_owner
{
my( $self, $possible_owner ) = @_;
if( $possible_owner->get_value( "userid" ) == $self->get_value( "userid" ) )
{
return 1;
}
return 0;
}
######################################################################
=pod
=item $ok = $user->mail( $subjectid, $message, [$replyto], [$email], [$cc_list] )
Send an email to this user.
$subjectid is the ID of a phrase to use as the subject of this email.
$message is an XML DOM object describing the message in simple XHTML.
$replyto is the reply to address for this email, if different to the
repository default.
$email is the email address to send this email to if different from
this users configured email address.
$cc_list is an optional cc_list (array ref)
Return true if the email was sent OK.
=cut
######################################################################
sub mail
{
my( $self, $subjectid, $message, $replyto, $email, $cc_list ) = @_; #EPrints Services/sf2 2010-11-18 added optional cc_list (array ref) for GREENWICH-17
# User , string, DOM, User/undef Other Email
# Mail the admin in the default language
my $langid = $self->get_value( "lang" );
my $lang = $self->{session}->get_repository->get_language( $langid );
my $remail;
my $rname;
if( defined $replyto )
{
$remail = $replyto->get_value( "email" );
$rname = EPrints::Utils::tree_to_utf8( $replyto->render_description() );
}
if( !defined $email )
{
$email = $self->get_value( "email" );
}
return EPrints::Email::send_mail(
session => $self->{session},
langid => $langid,
to_name => EPrints::Utils::tree_to_utf8( $self->render_description ),
to_email => $email,
subject => EPrints::Utils::tree_to_utf8( $lang->phrase( $subjectid, {}, $self->{session} ) ),
message => $message,
sig => $lang->phrase( "mail_sig", {}, $self->{session} ),
replyto_name => $rname,
replyto_email => $remail,
cc_list => $cc_list,
);
}
######################################################################
=pod
=item ( $page, $title ) = $user->render
Render this user into HTML using the "user_render" method in
ArchiveRenderConfig.pm. Returns both the rendered information and
the title as XHTML DOM.
=cut
######################################################################
sub render
{
my( $self ) = @_;
my( $dom, $title ) = $self->{session}->get_repository->call( "user_render", $self, $self->{session} );
if( !defined $title )
{
$title = $self->render_description;
}
return( $dom, $title );
}
# This should include all the info, not just that presented to the public.
######################################################################
=pod
=item ( $page, $title ) = $user->render_full
The same as $user->render, but renders all fields, not just those
intended for public viewing. This is the admin view of the user.
=cut
######################################################################
sub render_full
{
my( $self ) = @_;
my( $table, $title ) = $self->SUPER::render_full;
my $ds = $self->{session}->get_repository->get_dataset( "saved_search" );
foreach my $saved_search ( $self->get_saved_searches )
{
my $rowright = $self->{session}->make_doc_fragment;
foreach( "frequency","spec","mailempty" )
{
my $strong;
$strong = $self->{session}->make_element( "strong" );
$strong->appendChild( $ds->get_field( $_ )->render_name( $self->{session} ) );
$strong->appendChild( $self->{session}->make_text( ": " ) );
$rowright->appendChild( $strong );
$rowright->appendChild( $saved_search->render_value( $_ ) );
$rowright->appendChild( $self->{session}->make_element( "br" ) );
}
$table->appendChild( $self->{session}->render_row(
$self->{session}->html_phrase(
"page:saved_search" ),
$rowright ) );
}
return( $table, $title );
}
######################################################################
=pod
=item $url = $user->get_url
Return the URL which will display information about this user.
If $staff is true then return the URL for an administrator to view
and modify this record.
=cut
######################################################################
sub get_control_url
{
my( $self ) = @_;
return $self->{session}->get_repository->get_conf( "http_cgiurl" )."/users/home?screen=User::View&userid=".$self->get_value( "userid" );
}
######################################################################
=pod
=item $type = $user->get_type
Return the type of this user. Equivalent of
$user->get_value( "usertype" );
=cut
######################################################################
sub get_type
{
my( $self ) = @_;
return $self->get_value( "usertype" );
}
######################################################################
=pod
=item @saved_searches = $eprint->get_saved_searches
Return an array of all EPrint::DataObj::SavedSearch objects associated with this
user.
=cut
######################################################################
sub get_saved_searches
{
my( $self ) = @_;
my $dataset = $self->{session}->dataset( "saved_search" );
my $results = $dataset->search(
filters => [
{
meta_fields => [qw( userid )],
value => $self->value( "userid" ),
}
],
custom_order => $dataset->key_field->name );
return $results->slice;
}
=item $value = $user->preference( $key )
Retrieve the preference $key.
=cut
sub preference
{
my( $self, $key ) = @_;
my $prefs = $self->value( "preference" );
return undef if !defined $prefs;
return $prefs->{$key};
}
=item $user->set_preference( $key, $value )
Set a preference $key for the user to $value.
=cut
sub set_preference
{
my( $self, $key, $value ) = @_;
my $prefs = $self->value( "preference" );
$prefs = defined $prefs ? { %$prefs } : {};
if( EPrints::Utils::is_set( $value ) )
{
$prefs->{$key} = $value;
}
else
{
delete $prefs->{$key};
}
$self->set_value( "preference", $prefs );
}
######################################################################
=pod
=item $user->send_out_editor_alert
Called on users who are editors, when it's time to send their update
on what items are in the editorial review buffer.
Sends the email if needed.
=cut
######################################################################
sub send_out_editor_alert
{
my( $self ) = @_;
my $freq = $self->get_value( "frequency" );
if( $freq eq "never" )
{
$self->{session}->get_repository->log(
"Attempt to send out an editor alert for a user\n".
"which has frequency 'never'\n" );
return;
}
unless( $self->has_role( "editor" ) )
{
$self->{session}->get_repository->log(
"Attempt to send out an editor alert for a user\n".
"which does not have editor role (".
$self->get_value("username").")\n" );
return;
}
my $origlangid = $self->{session}->get_langid;
$self->{session}->change_lang( $self->get_value( "lang" ) );
# we're only interested in items under review (buffer)
my $list = $self->editable_eprints_list(