Project

General

Profile

« Previous | Next » 

Revision 10175

Added by Jing Tao about 7 years ago

Check the change of the access rules on data objects only when we need to write access rules base on the access part of the eml document.

View differences:

src/edu/ucsb/nceas/metacat/Eml200SAXHandler.java
2789 2789
          String previousDocid = 
2790 2790
        	  docid + PropertyService.getProperty("document.accNumSeparator") + previousRevision;
2791 2791
          PermissionController controller = new PermissionController(previousDocid);
2792
          if (controller.hasPermission(user, groups, AccessControlInterface.ALLSTRING)
2792
          if(writeAccessRules) {
2793
              if (controller.hasPermission(user, groups, AccessControlInterface.ALLSTRING)
2793 2794
        		  || controller.hasPermission(user, groups, AccessControlInterface.CHMODSTRING)) {
2794
            return guid;
2795
          }
2796
          else
2797
          {
2798
            throw new SAXException("User: " + user + " does not have permission to update " +
2795
                  return guid;
2796
              }
2797
              else
2798
              {
2799
                  throw new SAXException("User: " + user + " does not have permission to update " +
2799 2800
                  "access rules for data file "+ guid);
2801
              }
2800 2802
          }
2801 2803
        }//try
2802 2804
        catch(Exception e)

Also available in: Unified diff