Ignore:
Timestamp:
2013-05-07T21:08:06+12:00 (11 years ago)
Author:
ak19
Message:

No authentication and collection-locking when getting metadata. (Only for setting metadata.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/cgiactions/metadataaction.pm

    r27313 r27314  
    193193    ## my $collect_dir = &util::filename_cat($gsdlhome, "collect");
    194194
    195     # Make sure the collection isn't locked by someone else
    196     $self->lock_collection($username, $collect);
     195    # No locking collection when getting metadata, only when setting it
     196#    $self->lock_collection($username, $collect); # Make sure the collection isn't locked by someone else
    197197
    198198    # look up additional args
     
    236236
    237237    # Release the lock once it is done
    238     $self->unlock_collection($username, $collect);
     238#    $self->unlock_collection($username, $collect);
    239239}
    240240
     
    388388    my $gsdlhome  = $self->{'gsdlhome'};
    389389
    390     # Authenticate user if it is enabled
    391     if ($baseaction::authentication_enabled) {
    392     # Ensure the user is allowed to edit this collection   
    393     $self->authenticate_user($username, $collect); #&authenticate_user($gsdl_cgi, $username, $collect);
    394     }
    395 
    396390    # Obtain the collect dir
    397391    my $site = $self->{'site'};
    398392    my $collect_dir = $gsdl_cgi->get_collection_dir($site);
    399393    ##my $collect_dir = &util::filename_cat($gsdlhome, "collect");
    400 
    401     # Make sure the collection isn't locked by someone else
    402     $self->lock_collection($username, $collect);
    403394
    404395    # look up additional args
     
    433424    $gsdl_cgi->generate_ok_message("$metavalue");
    434425   
    435     # Release the lock once it is done
    436     $self->unlock_collection($username, $collect);
    437426}
    438427
     
    447436    my $gsdlhome  = $self->{'gsdlhome'};
    448437
    449     # Authenticate user if it is enabled
    450     if ($baseaction::authentication_enabled) {
    451         # Ensure the user is allowed to edit this collection
    452         $self->authenticate_user($username, $collect); #&authenticate_user($gsdl_cgi, $username, $collect);
    453     }
    454 
    455438    # Obtain the collect dir
    456439    my $site = $self->{'site'};
    457440    my $collect_dir = $gsdl_cgi->get_collection_dir($site);
    458441    ##my $collect_dir = &util::filename_cat($gsdlhome, "collect");
    459 
    460     # Make sure the collection isn't locked by someone else
    461     $self->lock_collection($username, $collect);
    462442
    463443    # look up additional args
     
    494474    $gsdl_cgi->generate_ok_message($self->get_metadata_from_metadata_xml($gsdl_cgi, $metadata_xml_filename, $metaname, $metapos, $import_tailname));
    495475
    496     # Release the lock once it is done
    497     $self->unlock_collection($username, $collect);
    498476}
    499477
     
    582560    my $infodbtype = $self->{'infodbtype'};
    583561
    584     # Authenticate user if it is enabled
    585     if ($baseaction::authentication_enabled) {
    586         # Ensure the user is allowed to edit this collection       
    587         $self->authenticate_user($username, $collect); #&authenticate_user($gsdl_cgi, $username, $collect);
    588     }
    589 
    590562    # Obtain the collect dir
    591563    my $site = $self->{'site'};
     
    594566    my $archive_dir = &util::filename_cat($collect_dir, $collect, "archives");
    595567
    596     # Make sure the collection isn't locked by someone else
    597     $self->lock_collection($username, $collect);
    598    
    599568    # look up additional args
    600569    my ($docid, $docid_secnum) = ($self->{'d'} =~ m/^(.*?)(\..*)?$/);
     
    613582    $gsdl_cgi->generate_ok_message($self->get_metadata_from_archive_xml($gsdl_cgi, &util::filename_cat($archive_dir, $doc_filename), $metaname, $metapos, $docid_secnum));
    614583
    615     # Release the lock once it is done
    616     $self->unlock_collection($username, $collect);
    617584}
    618585
Note: See TracChangeset for help on using the changeset viewer.