public string[] GetAllRoles() { try { return _roleProvider.GetAllRoles(); } catch (Exception ex) { Logger.Error("Error : ProfileService.GetAllRoles - {0}", ex.Message); return new string[0]; } }
protected override bool AuthorizeCore(HttpContextBase httpContext) { var currentUser = HttpContext.Current.User; var roleList = _roleProvider.GetAllRoles(); if (currentUser != null) { foreach (var role in roleList) { if (currentUser.IsInRole(role.Rolename)) { return(true); } } return(false); } return(false); }
public override string[] GetAllRoles() { return(RoleProvider.GetAllRoles()); }
public void TestNewProviderHasJustAdminRole() { Assert.AreEqual("Administrator", _provider.GetAllRoles().Single()); }
public List <RoleDetails> GetAllRoles() { return(_iRoleProvider.GetAllRoles()); }
public PartialViewResult AllRoles() { var roleList = _roleProvider.GetAllRoles(); return(PartialView(roleList)); }