Project

General

Profile

« Previous | Next » 

Revision 9309

Added by Jing Tao over 9 years ago

In the isAdminAuthorized method, the faiure of the isNodeAdmin method will not interrupt the next check - if it is a cn.

View differences:

src/edu/ucsb/nceas/metacat/dataone/D1NodeService.java
955 955
           session.getSubject().getValue());
956 956
      
957 957
      // check if this is the node calling itself (MN)
958
      allowed = isNodeAdmin(session);
958
      try {
959
          allowed = isNodeAdmin(session);
960
      } catch (Exception e) {
961
          logMetacat.warn("We can't determine if the session is a node subject. But we will contiune to check if it is a cn subject.");
962
      }
959 963
      
964
      
960 965
      // check the CN list
961 966
      if (!allowed) {
962 967
	      allowed = isCNAdmin(session);
......
978 983
          nodes = cn.listNodes().getNodeList();
979 984
      }
980 985
      catch (Throwable e) {
981
          logMetacat.warn(e.getMessage());
986
          logMetacat.warn("Couldn't get the node list from the cn since "+e.getMessage()+". So we can't determine if the subject is a CN.");
982 987
          return false;  
983 988
      }
984 989
          

Also available in: Unified diff