Beispiel #1
0
        public static async Task <RoleSetRoots> LoadRoleSetRoots(string adminId)
        {
            RoleSetRoots rrs  = new RoleSetRoots();
            var          maxp = await MemberAdminContext.GetMaxPriority(adminId);

            rrs.adminMaxLevel = maxp.Major;
            rrs.adminRoleIds  = maxp.RoleIds;
            RoleServiceProxy svc = new RoleServiceProxy();
            var roots            = svc.LoadEntitySetRoots(Cntx);

            rrs.roots = new List <dynamic>();
            foreach (var rr in roots)
            {
                rrs.roots.Add(MakeJsonRole(rr, maxp));
            }
            return(rrs);
        }
 public static async Task<RoleSetRoots> LoadRoleSetRoots(string adminId)
 {
     RoleSetRoots rrs = new RoleSetRoots();
     var maxp = await MemberAdminContext.GetMaxPriority(adminId);
     rrs.adminMaxLevel = maxp.Major;
     rrs.adminRoleIds = maxp.RoleIds;
     RoleServiceProxy svc = new RoleServiceProxy();
     var roots = svc.LoadEntitySetRoots(Cntx);
     rrs.roots = new List<dynamic>();
     foreach (var rr in roots)
         rrs.roots.Add(MakeJsonRole(rr, maxp));
     return rrs;
 }