Example #1
0
        private static void RecDescendantRoles(RoleSet set, RoleState parentRole, List <RoleState> children)
        {
            var acDomain = set._acDomain;
            var roleDic  = set._roleDic;

            foreach (var item in acDomain.PrivilegeSet.Where(a => a.SubjectType == AcElementType.Role && a.ObjectType == AcElementType.Role))
            {
                if (item.SubjectInstanceId == parentRole.Id)
                {
                    RoleState childRole;
                    if (roleDic.TryGetValue(item.ObjectInstanceId, out childRole))
                    {
                        RecDescendantRoles(set, childRole, children);
                        children.Add(childRole);
                    }
                }
            }
        }
Example #2
0
 internal MessageHandler(RoleSet set)
 {
     this._set = set;
 }