Just to sanity-check, can you tell me the exact steps you’re using for adding a 
user, and exactly what you see on the screen?

Christian

-- 
Christian Hammond - christ...@beanbaginc.com
Review Board - http://www.reviewboard.org
Beanbag, Inc. - http://www.beanbaginc.com

On June 24, 2014 at 6:02:03 PM, fireworm (firewor...@gmail.com) wrote:

I modified the one in 
/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/accounts/backend.py

Then I restarted Apache, and reloaded the page, and tried to add a user who 
doesn't have an RB account.

(I see an updated pyc in that folder as well)

But I don't see anything in reviewboard.log or the apache error.log.

On Tuesday, June 24, 2014 12:45:22 PM UTC-7, Christian Hammond wrote:
Sorry, busy few days.

You would need to edit reviewboard/accounts/backends.py and look for 
ActiveDirectoryBackend.

In it, you will find a ‘get_or_create_user’ function.

I’d start by adding a logging statement just below where username is assigned:

    logging.debug(‘ActiveDirectoryBackend.get_or_create_user: username = %s’, 
username)

Then, after the ‘user =‘ line:

    logging.debug(‘ActiveDirectoryBackend.get_or_create_user: Found user: %r’, 
user)

Then, before the ‘return user’:

    logging.debug(‘ActiveDirectoryBackend.get_or_create_user: Created new user 
%r’, user)

Then, change the ‘except’: to:

    except Exception as e:
        logging.error(‘ActiveDirectoryBackend.get_or_create_user: Failed to 
create user: %s’, e, exc_info=1)

Make sure to keep all indentation as spaces, multiples of 4.

You’ll then need to restart Apache, try to add a user in LDAP, and see what’s 
in the log.

The users will not appear in the auto-complete list until the user has either 
logged in or you’ve explicitly typed their username and added them at least 
once.

Christian

-- 
Christian Hammond - chri...@beanbaginc.com
Review Board - http://www.reviewboard.org
Beanbag, Inc. - http://www.beanbaginc.com

On June 23, 2014 at 2:11:27 PM, fireworm (firew...@gmail.com) wrote:

*bump*

Any ideas on what I can do?

On Thursday, June 19, 2014 9:08:00 AM UTC-7, fireworm wrote:
I'd be ok with adding some logging.

Just be super explicit on what to do and what commands to run after.  :)

On Thursday, June 19, 2014 12:54:49 AM UTC-7, Christian Hammond wrote:
Hi,

Would you feel comfortable adding some logging statements to the 
ActiveDirectory code to help track this down? It’s supposed to look up the 
appropriate user and add it, even if Review Board doesn’t yet know about it.

I can give you instructions on where to add them.

Christian

-- 
Christian Hammond - chri...@beanbaginc.com
Review Board - http://www.reviewboard.org
Beanbag, Inc. - http://www.beanbaginc.com

On June 18, 2014 at 1:42:43 PM, fireworm (firew...@gmail.com) wrote:

New install of RB 2.0.2 on Ubuntu, with Active Directory login working.  Users 
can login once and create their account correctly.

But I can't seem to add a user to a review who has not logged in at least once.

I enabled logging, but don't see anything in the log after failing to add a 
user.

(Looking at the sources, backends.py for ActiveDirectory doesn't output errors 
for exceptions in get_or_create_user())

Any advice on how to get this working?
--
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to