Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 354830

Summary: Site login requires connection to foundation_ro... why?
Product: Community Reporter: Denis Roy <denis.roy>
Component: WebsiteAssignee: phoenix.ui <phoenix.ui-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: webmaster
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Patch none

Description Denis Roy CLA 2011-08-16 10:05:28 EDT
From bug 354805:

Furthermore, logging into Eclipse forums isn't
possible either, and the page at https://dev.eclipse.org/site_login/index.php
says "Unable to connect to the database server at this time(foundation_ro)."

I don't know why the site login would need a connection to the foundation db.
Comment 1 Eclipse Webmaster CLA 2011-08-17 15:47:51 EDT
It seems to be part of the friends init sequence.  I've moved it into another part of the relevant class which should prevent it from being called during the login process.

-M.
Comment 2 Denis Roy CLA 2012-04-17 10:00:37 EDT
Reopening.  If we are expected to use the committer status on www (for bug 376732) it's better to load up the committer status at login.  The Friends object (which contains this status) is serialized to the sessions table on dbmaster/slave.  SO I'm effectively undoing this change.
Comment 3 Denis Roy CLA 2012-04-17 10:10:35 EDT
I will try to arrange it so that foundation_ro can fail silently, so that user authentication is never blocked by a missing DB server.
Comment 4 Denis Roy CLA 2012-04-17 10:53:38 EDT
Created attachment 214112 [details]
Patch

An even better way to do this is to examine the dn after a successful authentication.  If you're in ou=people, forcibly you're a committer.  No SQL query, no additional LDAP.

# Load up committer status
if(preg_match('/ou=people,/i', $dn)) {
    $Friend->setRoles("::CM::");
}
Comment 5 Denis Roy CLA 2012-04-17 11:22:37 EDT
COmmitted.