Beispiel #1
0
        /// <summary>
        /// Returns the roles for a given TUser
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        public async Task <IList <string> > GetRolesAsync(TUser user)
        {
            if (user == null)
            {
                throw new ArgumentNullException("user");
            }

            List <string> roles = await userRolesService.FindByUserIdAsync(user.Id);

            {
                if (roles != null)
                {
                    return(roles);
                }
            }

            return(null);
        }