1 17 package org.alfresco.filesys.server.auth.acl; 18 19 import org.alfresco.filesys.server.SrvSession; 20 import org.alfresco.filesys.server.auth.ClientInfo; 21 import org.alfresco.filesys.server.core.SharedDevice; 22 23 28 public class UserAccessControl extends AccessControl 29 { 30 37 protected UserAccessControl(String userName, String type, int access) 38 { 39 super(userName, type, access); 40 } 41 42 50 public int allowsAccess(SrvSession sess, SharedDevice share, AccessControlManager mgr) 51 { 52 53 55 if (sess.hasClientInformation() == false) 56 return Default; 57 58 60 ClientInfo cInfo = sess.getClientInformation(); 61 62 if (cInfo.getUserName() != null && cInfo.getUserName().equalsIgnoreCase(getName())) 63 return getAccess(); 64 return Default; 65 } 66 } 67 | Popular Tags |