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 DomainAccessControl extends AccessControl 29 { 30 31 38 protected DomainAccessControl(String domainName, String type, int access) 39 { 40 super(domainName, type, access); 41 } 42 43 52 public int allowsAccess(SrvSession sess, SharedDevice share, AccessControlManager mgr) 53 { 54 55 57 if (sess.hasClientInformation() == false 58 || sess instanceof org.alfresco.filesys.smb.server.SMBSrvSession == false) 59 return Default; 60 61 63 ClientInfo cInfo = sess.getClientInformation(); 64 65 if (cInfo.getDomain() != null && cInfo.getDomain().equalsIgnoreCase(getName())) 66 return getAccess(); 67 return Default; 68 } 69 } 70 | Popular Tags |