Esempio n. 1
0
        public async Task <bool> RemoveUserFromRole(FPUser user, string roleName)
        {
            var result = await _userManager.RemoveFromRoleAsync(user, roleName);

            return(result.Succeeded);
        }
Esempio n. 2
0
 public async Task <bool> IsUserInRole(FPUser user, string roleName)
 {
     return(await _userManager.IsInRoleAsync(user, roleName));
 }
Esempio n. 3
0
 public async Task <IEnumerable <string> > ListUserRoles(FPUser user)
 {
     return(await _userManager.GetRolesAsync(user));
 }
Esempio n. 4
0
        public async Task <bool> AddUserToRole(FPUser user, string roleName)
        {
            var result = await _userManager.AddToRoleAsync(user, roleName);

            return(result.Succeeded);
        }