nxus / users

User management module for Nxus apps.
MIT License
0 stars 0 forks source link

Error accessing admin when no roles defined (fresh install) #25

Open mjreich opened 7 years ago

mjreich commented 7 years ago

Error (using SQLite adapter)

Unhandled rejection Error (E_UNKNOWN) :: Encountered an unexpected error
: SELECT "users-role"."role", "users-role"."systemDefined", "users-role"."permissions", "users-role"."id", "users-role"."createdAt", "users-role"."updatedAt" FROM "users-role" AS "users-role"  WHERE "users-role"."id" IN )  - SQLITE_ERROR: near ")": syntax error
    at Error (native)
ScottMaxson commented 7 years ago

Also seeing this error from the bare "login" url as well, on new app-boilerplate with fresh, created "admin@localhost" user.

Seems to be coming from the getUser of UsersAuthMiddleware class - fresh admin@localhost doesn't have anything in roles attribute and it looks as if populate isn't handling case with nothing to join to?