Project

General

Profile

« Previous | Next » 

Revision 10021

Added by Jing Tao about 8 years ago

Add some information about pid on the log statement.

View differences:

src/edu/ucsb/nceas/metacat/dataone/D1NodeService.java
1005 1005
      for ( Node node : nodes ) {
1006 1006
          
1007 1007
          NodeReference nodeReference = node.getIdentifier();
1008
          logMetacat.debug("In isCNAdmin(), Node reference is: " + nodeReference.getValue());
1008
          logMetacat.debug("In isCNAdmin(), a Node reference from the CN node list is: " + nodeReference.getValue());
1009 1009
          
1010 1010
          Subject subject = session.getSubject();
1011 1011
          
......
1015 1015
              // check if the session subject is in the node subject list
1016 1016
              for (Subject nodeSubject : nodeSubjects) {
1017 1017
                  logMetacat.debug("In isCNAdmin(), comparing subjects: " +
1018
                      nodeSubject.getValue() + " and " + subject.getValue());
1018
                      nodeSubject.getValue() + " and the user " + subject.getValue());
1019 1019
                  if ( nodeSubject.equals(subject) ) {
1020 1020
                      allowed = true; // subject of session == target node subject
1021 1021
                      break;
......
1048 1048
         return false;
1049 1049
      }
1050 1050
      
1051
      logMetacat.debug("In isNodeAdmin(), MN authorization for " +
1051
      logMetacat.debug("In isNodeAdmin(), MN authorization for the user " +
1052 1052
           session.getSubject().getValue());
1053 1053
      
1054 1054
      Node node = MNodeService.getInstance(request).getCapabilities();
......
1063 1063
          // check if the session subject is in the node subject list
1064 1064
          for (Subject nodeSubject : nodeSubjects) {
1065 1065
              logMetacat.debug("In isNodeAdmin(), comparing subjects: " +
1066
                  nodeSubject.getValue() + " and " + subject.getValue());
1066
                  nodeSubject.getValue() + " and the user" + subject.getValue());
1067 1067
              if ( nodeSubject.equals(subject) ) {
1068 1068
                  allowed = true; // subject of session == this node's subect
1069 1069
                  break;
src/edu/ucsb/nceas/metacat/dataone/MNodeService.java
2684 2684
                    logMetacat.debug("The node id in metacat.properties is "+currentNodeId);
2685 2685
                    //System.out.println("The node id in metacat.properties is "+currentNodeId);
2686 2686
                    if(currentNodeId != null && !currentNodeId.trim().equals("") && currentNodeId.equals(nodeValue)) {
2687
                        logMetacat.debug("They are matching");
2687
                        logMetacat.debug("They are matching, so the authoritative mn of the object "+pid.getValue()+" is the current node");
2688 2688
                        //System.out.println("They are matching");
2689 2689
                        isAuthoritativeNode = true;
2690 2690
                    }
......
2734 2734
            	}
2735 2735
                    
2736 2736
            } else {
2737
                throw new NotAuthorized("4861", "Client can only call the request on the authoritative memember node.");
2737
                throw new NotAuthorized("4861", "Client can only call the request on the authoritative memember node of the object "+pid.getValue());
2738 2738
                
2739 2739
            }
2740 2740
        }

Also available in: Unified diff