Project

General

Profile

« Previous | Next » 

Revision 3501

Added by barteau over 16 years ago

Find out if the document is a Member of an EML package, and if that's not the case, than skip the test to see if access is set through EML metadata.

View differences:

src/edu/ucsb/nceas/metacat/MetaCatServlet.java
3068 3068
        String error = null;
3069 3069
        Vector successList = new Vector();
3070 3070
        String success = null;
3071

  
3071
        boolean isEmlPkgMember = false;
3072
        
3072 3073
        // Get parameters
3073 3074
        if (params.containsKey("docid")) {
3074 3075
            docList = (String[]) params.get("docid");
......
3144 3145
                continue;
3145 3146
            }
3146 3147

  
3148
            //*** Find out if the document is a Member of an EML package.
3149
            //*** (for efficiency, only check if it isn't already true
3150
            //*** for the case of multiple files).
3151
            if (isEmlPkgMember == false)
3152
                isEmlPkgMember = (DBUtil.findDataSetDocIdForGivenDocument(accessionNumber) != null);
3153

  
3147 3154
            // If docid publicid is BIN data file or other beta4, 6 package
3148 3155
            // document
3149 3156
            // we could not do set access control. Because we don't want
3150 3157
            // inconsistent
3151 3158
            // to its access docuemnt
3152 3159
            if (publicId != null && packageSet != null
3153
                    && packageSet.contains(publicId)) {
3160
                    && packageSet.contains(publicId) && isEmlPkgMember) {
3154 3161
                error = "Could not set access control to document "
3155 3162
                        + accessionNumber
3156 3163
                        + "because it is in a pakcage and it has a access file for it";

Also available in: Unified diff