diff options
author | Dennis Eriksen <dennis.se@gmail.com> | 2013-05-14 09:55:10 +0200 |
---|---|---|
committer | Dennis Eriksen <dennis.se@gmail.com> | 2013-05-14 09:55:10 +0200 |
commit | 7e0295bc53c8528752e57967f73b2ed24d8fdf27 (patch) | |
tree | df98ea3c73a60fc2a15e02215aff9efaaf2bce72 /models/Access.js | |
parent | added length parameter to random token generator (diff) | |
download | Divid-7e0295bc53c8528752e57967f73b2ed24d8fdf27.tar.gz |
added access priveliges in comments, so we know what they mean
Diffstat (limited to 'models/Access.js')
-rw-r--r-- | models/Access.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/models/Access.js b/models/Access.js index 3c29a36..bde5b4a 100644 --- a/models/Access.js +++ b/models/Access.js @@ -6,6 +6,18 @@ var mongoose = require('mongoose') , Schema = mongoose.Schema; + +/** + * Schema + * + * Permissions: + * 3 = normal + * 6 = admin + * 9 = owner + * These permissions are set in steps of three, in case + * we need to add more permissions later. + */ + var AccessSchema = new Schema({ user: { type: Schema.ObjectId, ref: 'User' }, creator: { type: Schema.ObjectId, ref: 'User' }, @@ -15,6 +27,7 @@ var AccessSchema = new Schema({ updated: { type: Date, default: Date.now } }); + // the four validations below only apply if you are signing up traditionally AccessSchema.statics = { |