Ignore:
Timestamp:
2014-11-10T14:47:05+13:00 (9 years ago)
Author:
kjdon
Message:

adding in debug stuff for a collection, eg so that can run greenbug. Now the user can be all-collections-editor or collname-collection-editor. They are more likely to be one of these and want to use greenbug than they are to be an administrator

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/TransformingReceptionist.java

    r28966 r29421  
    678678
    679679            inlineTemplate = (String) params.get(GSParams.INLINE_TEMPLATE);
    680 
    681             if (params.get(GSParams.DEBUG) != null && (((String) params.get(GSParams.DEBUG)).equals("on") || ((String) params.get(GSParams.DEBUG)).equals("1") || ((String) params.get(GSParams.DEBUG)).equals("true")))
     680            String debug_p = (String) params.get(GSParams.DEBUG);
     681            if (debug_p != null && (debug_p.equals("on") || debug_p.equals("1") || debug_p.equals("true")))
    682682            {
    683683                String[] groups = new UserContext(request).getGroups();
     
    689689                    {
    690690                        found = true;
     691                        break;
     692                    }
     693                    if (!collection.equals("")) {
     694                      if (g.equals("all-collections-editor")) {
     695                        found = true;
     696                        break;
     697                      }
     698                     
     699                      if (g.equals(collection+"-collection-editor")) {
     700                        found = true;
     701                        break;
     702                      }
    691703                    }
    692704                }
     
    10351047            formatFile = "text_fragment_format.xsl";
    10361048        }
     1049
    10371050        String configStylesheet_file = GSFile.stylesheetFile(GlobalProperties.getGSDL3Home(), (String) this.config_params.get(GSConstants.SITE_NAME), collection, (String) this.config_params.get(GSConstants.INTERFACE_NAME), base_interfaces, formatFile);
    10381051        Document configStylesheet_doc = this.converter.getDOM(new File(configStylesheet_file));
Note: See TracChangeset for help on using the changeset viewer.