Skip to content

Commit

Permalink
Only show 'Make document OA' form to editors
Browse files Browse the repository at this point in the history
... when responding to a view request. This depends on e2c9a73
  • Loading branch information
phluid61 committed Aug 18, 2014
1 parent e2c9a73 commit 1d5c0b1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion perl_lib/EPrints/Plugin/Screen/Request/Respond.pm
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,10 @@ sub render
$form->appendChild( $textarea );
}

if( $action eq "accept" )
# Only display the 'Make this document OA' form if the user
# has privilege to edit this document
if( $action eq "accept"
&& $self->allow( 'eprint/archive/edit', $self->{processor}->{eprint} ) )
{
my $p = $session->make_element( "p" );
$form->appendChild( $p );
Expand Down

1 comment on commit 1d5c0b1

@MrkGrgsn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm concerned that this commit will change repo behaviour (removing this option when it was previously displayed) when it's applied and also that the only way that an author can be given access to make the document OA is by giving full edit access. I suggest defining a new privilege and having something like:

if( $action eq "accept" 
   && ( $self->allow( 'eprint/archive/edit', $self->{processor}->{eprint} ) 
          || $self->allow( 'eprint/archive/make-doc-open', $self->{processor}->{eprint} ) ) )

Please sign in to comment.