示例#1
0
 public List<PermissionInfo> GetPermissions(object o)
 {
     TypeInfo ti = _Framework.GetTypeInfoByTypeName(o.GetType().FullName);
     List<PermissionInfo> list = new List<PermissionInfo>();
     if (ti != null)
         foreach (PermissionInfo info in ti.Permissions)
         {
             bool access = RawHasPermission(o, info.PermissionName);
             PermissionInfo pi = new PermissionInfo(info.PermissionName, access);
             list.Add(pi);
         }
     return list;
 }
示例#2
0
        public List <PermissionInfo> GetPermissions(object o)
        {
            TypeInfo ti = _Framework.GetTypeInfoByTypeName(o.GetType().FullName);
            List <PermissionInfo> list = new List <PermissionInfo>();

            if (ti != null)
            {
                foreach (PermissionInfo info in ti.Permissions)
                {
                    bool           access = RawHasPermission(o, info.PermissionName);
                    PermissionInfo pi     = new PermissionInfo(info.PermissionName, access);
                    list.Add(pi);
                }
            }
            return(list);
        }
示例#3
0
 public TypePermissionInformation(Framework fw, TypeInfo ti, PermissionInfo pi, Role ar, bool isInherited)
 {
     SecurityFramework = fw;
     TypeInfo = ti;
     PermissionInfo = pi;
     ActualRole = ar;
     IsInherited = isInherited;
 }
示例#4
0
 public ObjectPermissionInformation(Framework fw, object obj, PermissionInfo pi, Role ar, bool isInherited)
 {
     SecurityFramework = fw;
     Obj = obj;
     PermissionInfo = pi;
     ActualRole = ar;
     IsInherited = isInherited;
 }