Project

General

Profile

« Previous | Next » 

Revision 1322

Added by Jing Tao about 22 years ago

Using ! rather than white space to seperate access rule.

View differences:

src/edu/ucsb/nceas/metacat/AccessRulesFromDB.java
104 104
      while (hasRows) 
105 105
      {
106 106
        principal  = rs.getString(1);
107
        if (principal != null)
108
        {
109
          principal = principal.trim();
110
        }
107 111
        allowType  = rs.getString(2);
112
        if ( allowType != null)
113
        {
114
          allowType = allowType.trim();
115
        }
108 116
        permision  = rs.getInt(3);
109 117
        allowOrder = rs.getString(4);
118
        if (allowOrder != null)
119
        {
120
          allowOrder.trim();
121
        }
110 122
        //combine access rule
111
        accessRule = principal + " ";
112
        accessRule = accessRule + allowType + " ";
113
        accessRule = accessRule + permision + " ";
123
        accessRule = principal + CleanupAccessTable.DELIMITER;
124
        accessRule = accessRule + allowType + CleanupAccessTable.DELIMITER;
125
        accessRule = accessRule + permision + CleanupAccessTable.DELIMITER;
114 126
        accessRule = accessRule + allowOrder;
115 127
        // if hashtable doesn't has the rule add to hashtable
116 128
        if (!accessRuleVector.contains(accessRule))

Also available in: Unified diff