Ignore:
Timestamp:
2015-05-12T21:47:35+12:00 (9 years ago)
Author:
ak19
Message:

First part of commit for ensuring the user is authenticated when running the scripts used by the online metadata editor. Running metaserver, BuildAndActivate and other GS2Construct.java commands should not be possible from a web browser.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/js/javascript-global-functions.js

    r27811 r29869  
    424424function callMetadataServer(callingFunction, url, responseFunction)
    425425{
     426    // rewrite URLs to call GS2Construct's SetMetadata service instead
     427    url = url.replace("&c=",  "&collection="); // c is a special param name for GS2Construct
     428    url = url.replace(/(&|\?)([^=]*=)/g, "$1"+"s1.$2"); // prefix param names with "s1."
     429    url = url.replace("cgi-bin/metadata-server.pl?",  gs.xsltParams.library_name + "?a=g&rt=r&ro=1&s=SetMetadata&");
     430
     431
    426432    $.ajax(url)
    427433    .success(function(response)
Note: See TracChangeset for help on using the changeset viewer.