Skip to content
This repository has been archived by the owner on Jan 10, 2022. It is now read-only.

Exception when first login with admin #60

Closed
ddragostinov opened this issue Jun 26, 2011 · 3 comments
Closed

Exception when first login with admin #60

ddragostinov opened this issue Jun 26, 2011 · 3 comments

Comments

@ddragostinov
Copy link

Hi guys,

I found out about NodeJS a few days ago and I like it. I'm planning to get involved in a project and I'm still looking around. When I logged with the admin acount I got the following exception:

26 Jun 12:23:15 - info: Content types module installed ...
26 Jun 12:23:15 - info: User module installed ...
Uncaught exception: TypeError: Cannot read property 'isAdmin' of undefinedTypeError: Cannot read property 'isAdmin' of undefined
at /home/ddragostinov/Node/calipso/modules/core/user/user.module.js:595:34
at Array.forEach (native)
at isUserAdmin (/home/ddragostinov/Node/calipso/modules/core/user/user.module.js:594:14)
at createUserSession (/home/ddragostinov/Node/calipso/modules/core/user/user.module.js:606:17)
at /home/ddragostinov/Node/calipso/modules/core/user/user.module.js:566:13
at /home/ddragostinov/Node/calipso/node_modules/mongoose/lib/mongoose/query.js:794:7
at model.init (/home/ddragostinov/Node/calipso/node_modules/mongoose/lib/mongoose/document.js:147:5)
at /home/ddragostinov/Node/calipso/node_modules/mongoose/lib/mongoose/query.js:792:12
at [object Object]. (/home/ddragostinov/Node/calipso/node_modules/mongoose/support/node-mongodb-native/lib/mongodb/collection.js:462:35)
at [object Object].emit (events.js:67:17)
^Cddragostinov@ubuntu:~/Node/calipso$ node app.js

The second time i ran the app it worked fine.

@josmas
Copy link

josmas commented Jun 26, 2011

same problem here... a restart fixes it!

@cliftonc
Copy link
Owner

I'll take a look, probably a left over of the recent work in the user module ... yet another indication I need to write more tests ;)

cliftonc added a commit that referenced this issue Jun 27, 2011
@cliftonc
Copy link
Owner

Now fixed, the roles weren't being cached as part of the install process (into calipso.data.roles) via 7cb6872

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants