Project

General

Profile

« Previous | Next » 

Revision 6696

Added by Jing Tao almost 13 years ago

Set sessionid for clientVeiwBean when it handle a request.
Always set the order type to "allowFirst".

View differences:

src/edu/ucsb/nceas/metacat/clientview/ClientViewHelper.java
143 143
        if (clientViewBean != null) {
144 144
            action = clientViewBean.getAction();
145 145
            contentType = request.getContentType();
146
            
146
            clientViewBean.setSessionid(request.getSession().getId());
147 147
            //*** BEGIN: manual bind params to bean (if we arrived here via the ClientViewHelper.jspx).
148 148
            if (action == null || action.equals("")) {
149 149
                if (contentType != null && contentType.indexOf("multipart/form-data") > -1) {
......
493 493
        String                      result = " for Documents ";
494 494
        String                      docId, lst = metaDocId, permOrder;
495 495
        
496
        if (permissionType.equals("allow"))
496
        /*if (permissionType.equals("allow"))
497 497
            permOrder = "denyFirst";
498 498
        else
499
            permOrder = "allowFirst";
499
            permOrder = "allowFirst";*/
500
        permOrder = "allowFirst";
500 501
        
501 502
        getMetacatClient().setAccess(metaDocId, "public", "read", permissionType, permOrder);
502 503
        //*** Grant the public read access to the data files.
......
1008 1009
        String                      result, docId, message;
1009 1010
        
1010 1011
        docId = clientViewBean.getMetaFileDocId();
1012
        //System.out.println("get the the session id "+clientViewBean.getSessionid()+ " from the client view bean object "+clientViewBean.toString());
1011 1013
        if (clientViewBean.getAction().equals(DOWNLOAD_ACTION)) {
1012 1014
            result = null;
1013 1015
        } else if (docId != null && !docId.equals("")) {

Also available in: Unified diff