Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue where the first inserted user is not assigned the 'admin' role #836

Merged
merged 1 commit into from
Sep 19, 2015

Commits on Sep 19, 2015

  1. Fix issue where the first inserted user is not assigned the 'admin'

    role.
    
    Modifies admin role assignment to check if the inserted user is the
    first user based on sorted query using "createdAt".
    
    Originally, the admin role assignment was done onCreateUser before
    the user record was inserted into the db.  It assigned the 'admin' role
    to a user if no other user existed in the db.  However, with the change
    to insertUserDoc, the 'admin' assignment is done AFTER the first user
    is inserted and the original query logic (check if any user exists) no
    longer applies
    rwakida committed Sep 19, 2015
    Configuration menu
    Copy the full SHA
    fe1b88c View commit details
    Browse the repository at this point in the history