public RoleList GetRolesBySearchCriteria(IUserContext userContext, IRoleSearchCriteria searchCriteria) { RoleList roleList = new RoleList(); if (searchCriteria.Identifier != null && (searchCriteria.Identifier.Equals("%%") || searchCriteria.Identifier.Contains(DyntaxaTestSettings.Default.TestRevisionId.ToString()))) { roleList.Add(GetTaxonRevisionRole(userContext.User.UserName, DyntaxaTestSettings.Default.TestApplicationUserId, userContext, DyntaxaTestSettings.Default.TestRevisionGUID)); } else if (searchCriteria.Identifier != null && searchCriteria.Identifier.Contains(DyntaxaTestSettings.Default.TestRevisionOngoingId.ToString())) { roleList.Add(GetTaxonRevisionRole(userContext.User.UserName, DyntaxaTestSettings.Default.TestApplicationUserId, userContext, DyntaxaTestSettings.Default.TestRevisionOngoingGUID)); } else if (searchCriteria.Identifier != null && searchCriteria.Identifier.Contains(DyntaxaTestSettings.Default.TestRevisionPublishedId.ToString())) { roleList.Add(GetTaxonRevisionRole(userContext.User.UserName, DyntaxaTestSettings.Default.TestApplicationUserId, userContext, DyntaxaTestSettings.Default.TestRevisionPublishedGUID)); } else if (searchCriteria.Identifier != null && searchCriteria.Identifier.Equals(Resources.DyntaxaSettings.Default.TaxonRevisionAdministrator)) { roleList.Add(GetTaxonAdministratorRole(userContext.User.UserName, DyntaxaTestSettings.Default.TestDummyUserId, userContext)); } else if (searchCriteria.Identifier != null && searchCriteria.Identifier.Equals(Resources.DyntaxaSettings.Default.DyntaxaTaxonEditor)) { roleList.Add(GetTaxonEditorRole(userContext.User.UserName, DyntaxaTestSettings.Default.TestUserId, userContext)); } else if (searchCriteria.Name != null && searchCriteria.Name.Contains(DyntaxaTestSettings.Default.TestRevisionId.ToString())) { roleList.Add(GetTaxonRevisionRole(userContext.User.UserName, DyntaxaTestSettings.Default.TestApplicationUserId, userContext, DyntaxaTestSettings.Default.TestRevisionGUID)); } else { roleList.Add(GetTaxonEditorRole(userContext.User.UserName, DyntaxaTestSettings.Default.TestUserId, userContext)); roleList.Add(GetTaxonAdministratorRole("TestUser2", DyntaxaTestSettings.Default.TestDummyUserId, userContext)); roleList.Add(GetTaxonRevisionRole("TestUser3", DyntaxaTestSettings.Default.TestApplicationUserId, userContext, DyntaxaTestSettings.Default.TestRevisionGUID)); } // //roleList.Add(GetTaxonRevisionRole(userContext.User.UserName, 2, userContext, DyntaxaTestSettings.Default.TestRevisionGUID)); return(roleList); }
public RoleList GetRolesBySearchCriteria(IUserContext userContext, IRoleSearchCriteria searchCriteria) { throw new NotImplementedException(); }
/// <summary> /// Get roles that matches the search criteria. /// </summary> /// <param name="userContext">User context.</param> /// <param name="searchCriteria">Role search criteria.</param> /// <returns>Roles that matches the search criteria</returns> public virtual RoleList GetRolesBySearchCriteria(IUserContext userContext, IRoleSearchCriteria searchCriteria) { return(DataSource.GetRolesBySearchCriteria(userContext, searchCriteria)); }