/// <summary>
        /// Manufacture and check object ACL against the current session context.
        /// </summary>
        /// <param name="instance"></param>
        /// <param name="op"></param>
        public static void Check(IDataObject instance, DataOperation op)
        {
            // create an instance of an ACL
            string aclClassTypeName = string.Format("Vestris.Service.Data.{0}ClassACL", instance.GetType().Name);
            Type   aclClassType     = Assembly.GetExecutingAssembly().GetType(aclClassTypeName, true, false);

            object[] args = { instance };
            ACL      acl  = (ACL)Activator.CreateInstance(aclClassType, args);

            acl.Check((UserContext)SessionManager.CurrentSessionContext, op);
        }
示例#2
0
文件: ACL.cs 项目: dblock/codeproject
 public void Add(ACL value)
 {
     _accessControlList.AddRange(value.AccessControlList);
 }
示例#3
0
文件: ACL.cs 项目: dblock/codeproject
 public ACL(ACL value)
 {
     _accessControlList.AddRange(value._accessControlList);
 }
示例#4
0
 public void Add(ACL value)
 {
     _accessControlList.AddRange(value.AccessControlList);
 }
示例#5
0
 public ACL(ACL value)
 {
     _accessControlList.AddRange(value._accessControlList);
 }