Project

General

Profile

« Previous | Next » 

Revision 1492

Added by Jing Tao over 21 years ago

Fixed a bug to check permission for a node.

View differences:

src/edu/ucsb/nceas/metacat/PermissionController.java
247 247
                                             String myPermission, long nodeId)
248 248
                                             throws McdbException
249 249
  {
250
    boolean flag = false;
250
    boolean flag = true;
251 251
    // Get unaccessble subtree for this user
252 252
    Hashtable unaccessableSubTree = hasUnaccessableSubTree(user, groups, 
253 253
                                                           myPermission);
......
257 257
      SubTree tree = (SubTree)en.nextElement();
258 258
      long start = tree.getStartNodeId();
259 259
      long stop  = tree.getEndNodeId();
260
      // nodeid in unaccessablesubtree, return false
260 261
      if ( nodeId >= start && nodeId <= stop)
261 262
      {
262
        flag = true;
263
        flag = false;
263 264
        break;
264 265
      }
265 266
    }

Also available in: Unified diff