[Rainbowportal-devel] [RBJIRA] Created: (RBP-665) Search not working correctly
Brought to you by:
danijel_kecman,
manudea
From: <ji...@ra...> - 2005-03-10 16:46:58
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://support.rainbowportal.net/jira/browse/RBP-665 Here is an overview of the issue: --------------------------------------------------------------------- Key: RBP-665 Summary: Search not working correctly Type: Bug Status: Open Priority: Minor Project: Rainbow Portal Components: Modules Versions: 1.4 Assignee: Emmanuele De Andreis Reporter: Created: gio, 10 mar 2005 5:44 PM Updated: gio, 10 mar 2005 5:44 PM Environment: not significant Description: Hi! My name is Jesus M Delgado 'Mack', and I've been using Rainbow for some time in an intranet. While testing the search capabilities, I have found what I think is a bug.I think the search function of the portal is not working well, as: 1. It doesn't take in account the "Authorized Users" and "Unathorized Users" roles 2. It doesn't take in account when an user belongs to more than a role. This happens due to the codification of the AddSharedSQL in the (RC4) Helpers/SearchHelper class. I have modified it as I think it should be. Please, take a look at it and consider adding the appropiate modifications to the project if it's valid: public static void AddSharedSQL(int portalID, int userID, ref StringBuilder select, string fieldName) { HttpContext context=HttpContext.Current; string [] asRoles=Rainbow.Security.PortalSecurity.GetRoles(); /*if (userID>-1) select.Append(", rb_Roles, rb_UserRoles");*/ select.Append(" WHERE itm." + fieldName + " IS NOT NULL"); select.Append(" AND itm.ModuleID = mod.ModuleID"); select.Append(" AND mod.ModuleDefID = modDef.ModuleDefID"); select.Append(" AND modDef.PortalID = " + portalID.ToString()); select.Append(" AND tab.PortalID = " + portalID.ToString()); select.Append(" AND tab.TabID = mod.TabID"); if (userID>-1) { //select.Append(" AND rb_UserRoles.UserID = " + userID.ToString()); //select.Append(" AND rb_UserRoles.RoleID = rb_Roles.RoleID"); //select.Append(" AND rb_Roles.PortalID = " + portalID.ToString()); select.Append(" AND ((mod.AuthorizedViewRoles LIKE '%All Users%') "); if (context.Request.IsAuthenticated) // - no tenia en cuenta el rol "Authenticated users" select.Append(" OR (mod.AuthorizedViewRoles LIKE '%Authenticated Users%')"); else select.Append(" OR (mod.AuthorizedViewRoles LIKE '%Unauthenticated Users%')"); foreach (string sRole in asRoles) select.Append(" OR (mod.AuthorizedViewRoles LIKE '%" + sRole + "%')"); select.Append(")"); select.Append(" AND ((tab.AuthorizedRoles LIKE '%All Users%')"); if (context.Request.IsAuthenticated) // - no tenia en cuenta el rol "Authenticated users" select.Append(" OR (tab.AuthorizedRoles LIKE '%Authenticated Users%')"); foreach (string sRole in asRoles) select.Append(" OR (tab.AuthorizedRoles LIKE '%" + sRole + "%')"); select.Append(")"); } else { select.Append(" AND (mod.AuthorizedViewRoles LIKE '%All Users%')"); select.Append(" AND (tab.AuthorizedRoles LIKE '%All Users%')"); } } If you need further data, please don't hesitate to contact me at nn...@ya... Regards, MacK --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://support.rainbowportal.net/jira/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |