Project

General

Profile

« Previous | Next » 

Revision 862

Added by berkley about 23 years ago

added new permission 'changepermission' and made 'all' inclusive for all permissions

View differences:

src/edu/ucsb/nceas/metacat/AccessControlList.java
54 54
 */
55 55
public class AccessControlList extends DefaultHandler {
56 56

  
57
  private static final int ALL = 1;
57
  private static final int CHMOD = 1;
58 58
  private static final int WRITE = 2;
59 59
  private static final int READ = 4;
60
  private static final int ALL = 7;
60 61
  private static String sysdate = MetaCatUtil.dbAdapter.getDateTimeFunction();
61 62
  private static String isnull = MetaCatUtil.dbAdapter.getIsNULLFunction();
62 63

  
......
194 195
    // Set the ErrorHandler to this instance
195 196
    parser.setErrorHandler((ErrorHandler)this);
196 197

  
197
    return parser;
198
    return parser; 
198 199
  }
199 200
  
200 201
  /**
......
262 263
    }
263 264
    String inputString = new String(ch, start, length);
264 265
    inputString = inputString.trim(); 
266
    //System.out.println("==============inputString: " + inputString);
265 267
    BasicNode currentNode = (BasicNode)elementStack.peek(); 
266 268
    String currentTag = currentNode.getTagName();
267 269

  
......
275 277
          permission = permission | READ;
276 278
        } else if ( inputString.trim().toUpperCase().equals("WRITE") ) {
277 279
          permission = permission | WRITE;
280
        } else if ( inputString.trim().toUpperCase().equals("CHANGEPERMISSION") ) {
281
          permission = permission | CHMOD;
278 282
        } else if ( inputString.trim().toUpperCase().equals("ALL") ) {
279 283
          permission = permission | ALL;
280
        } /*else{
284
        }/*else{
281 285
          throw new SAXException("Unknown permission type: " + inputString);
282 286
        }*/
283 287

  

Also available in: Unified diff