示例#1
0
        public override string[] GetAllRoles()
        {
            RolesFinder = ContainerInit._container.Resolve <IRolesFinder>();
            List <RoleDto> listRoles = RolesFinder.FindRoles();

            return(listRoles.Select(r => r.RoleName).ToArray());
        }
示例#2
0
        public override string[] GetRolesForUser(string username)
        {
            RolesFinder = ContainerInit._container.Resolve <IRolesFinder>();
            IList <RoleDto> listRoles = RolesFinder.FindUserRoles(username);

            if (listRoles == null)
            {
                return new string[] { }
            }
            ;

            return(listRoles.Select(lr => lr.RoleName).ToArray());
        }