Ignore:
Timestamp:
2019-07-23T13:45:16+12:00 (5 years ago)
Author:
kjdon
Message:

made it optional whether the user gets shown the terms and conditions (verify) every time, or just once. In collectionConfig.xml, in security element, set humanVerify=once to make it show the verify page only once (per session), otherwise set to 'true' or 'always', which will show the page everytime.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/collection/Collection.java

    r33176 r33347  
    8181    /** Stores the scope of any security rules (either collection or document) */
    8282    protected boolean _securityScopeCollection = true;
    83         protected boolean _humanVerify = false;
     83        protected String _humanVerify = null;
    8484        protected boolean _useRecaptcha = false; // for human verify
    8585        protected String _siteKey = null; // for recaptcha
     
    340340
    341341        String humanVerify = securityBlock.getAttribute(GSXML.VERIFY_ATT);
    342         if (humanVerify.equals("true")) {
    343           _humanVerify = true;
     342        if (!humanVerify.equals("") && !humanVerify.equals("false")) {
     343          _humanVerify = humanVerify;
    344344        }
    345345
     
    519519        response.setAttribute(GSXML.TYPE_ATT, GSXML.REQUEST_TYPE_SECURITY);
    520520
    521         if (_humanVerify) {
    522           response.setAttribute("humanVerify", "true");
     521        if (_humanVerify != null) {
     522          response.setAttribute("humanVerify", _humanVerify);
    523523          if (_useRecaptcha) {
    524524            response.setAttribute("siteKey", _siteKey);
Note: See TracChangeset for help on using the changeset viewer.