Project

General

Profile

« Previous | Next » 

Revision 5742

Added by berkley about 14 years ago

fixed bug where comparisons didn't work because of my change this morning

View differences:

src/edu/ucsb/nceas/metacat/accesscontrol/AccessControlList.java
636 636
    /* Get the int value of READ, WRITE, CHMOD or ALL. */
637 637
	public static int intValue(String permission) {
638 638
	    
639
		int thisPermission = -1;
639
		int thisPermission = 0;
640 640
		try
641 641
		{
642 642
		    thisPermission = new Integer(permission).intValue();
src/edu/ucsb/nceas/metacat/PermissionController.java
119 119
  {
120 120
    boolean hasPermission=false;
121 121
    String [] userPackage=null;
122
    int permission =AccessControlList.intValue(myPermission);
122
    int permission = AccessControlList.intValue(myPermission);
123 123

  
124 124
    //for the commnad line invocation
125 125
    if ((user==null) && (groups==null || groups.length==0))
......
140 140
    }//if
141 141
    else //in other situation, just check the request permission
142 142
    {
143

  
144

  
145 143
      // Check for @permission on @docid for @user and/or @groups
146 144
      hasPermission = hasPermission(userPackage,docId, permission);
147

  
148 145
    }//else
149 146

  
150 147
    return hasPermission;

Also available in: Unified diff