diff --git a/mobile/ios/DeightonAR/Info.plist b/mobile/ios/DeightonAR/Info.plist
index c42738b..1579c87 100644
--- a/mobile/ios/DeightonAR/Info.plist
+++ b/mobile/ios/DeightonAR/Info.plist
@@ -21,7 +21,7 @@
CFBundleSignature
????
CFBundleVersion
- 20180413.0
+ 20180413.1
LSRequiresIPhoneOS
NSAppTransportSecurity
diff --git a/mobile/src/version.js b/mobile/src/version.js
index 5ba431a..3a00023 100644
--- a/mobile/src/version.js
+++ b/mobile/src/version.js
@@ -1,6 +1,6 @@
export const versionInfo = {
version: '1.0.0',
- fullVersion: '1.0.0-20180413.0',
+ fullVersion: '1.0.0-20180413.1',
title: 'Deighton AR System',
copyright: '© 2018, Kingston Software Solutions.',
supportEmail: 'support@kss.us.com',
diff --git a/server/src/database/schemas/user.js b/server/src/database/schemas/user.js
index 85a637a..8f3677b 100644
--- a/server/src/database/schemas/user.js
+++ b/server/src/database/schemas/user.js
@@ -1,38 +1,62 @@
-import { Schema } from 'mongoose'
-import { regExpPattern } from 'regexp-pattern'
+import { Schema } from "mongoose"
+import { regExpPattern } from "regexp-pattern"
-export let userSchema = new Schema({
- _id: { type: Schema.Types.ObjectId, required: true, auto: true },
- loginToken: { type: String, index: true, unique: true, sparse: true },
- passwordHash: {
- type: {
- hash: String,
- salt: String,
- keyLength: Number,
- hashMethod: String,
- iterations: Number
- }
+export let userSchema = new Schema(
+ {
+ _id: { type: Schema.Types.ObjectId, required: true, auto: true },
+ loginToken: {
+ type: String,
+ index: true,
+ unique: true,
+ partialFilterExpression: { loginToken: { $type: "string" } },
+ },
+ passwordHash: {
+ type: {
+ hash: String,
+ salt: String,
+ keyLength: Number,
+ hashMethod: String,
+ iterations: Number,
+ },
+ },
+ email: {
+ type: String,
+ match: regExpPattern.email,
+ required: true,
+ index: true,
+ unique: true,
+ },
+ newEmail: { type: String, match: regExpPattern.email },
+ thumbnailImageId: { type: Schema.Types.ObjectId },
+ emailToken: {
+ type: {
+ value: {
+ type: String,
+ index: true,
+ unique: true,
+ partialFilterExpression: { emailToken: { $type: "string" } },
+ },
+ created: Date,
+ },
+ },
+ passwordToken: {
+ type: {
+ value: {
+ type: String,
+ index: true,
+ unique: true,
+ partialFilterExpression: { passwordToken: { $type: "string" } },
+ },
+ created: Date,
+ },
+ },
+ firstName: { type: String, required: true },
+ lastName: { type: String, required: true },
+ administrator: { type: Boolean, required: true },
+ team: Schema.Types.ObjectId,
},
- email: { type: String, match: regExpPattern.email, required: true, index: true, unique: true },
- newEmail: { type: String, match: regExpPattern.email },
- thumbnailImageId: { type: Schema.Types.ObjectId },
- emailToken: {
- type: {
- value: { type: String, index: true, unique: true, sparse: true },
- created: Date
- }
- },
- passwordToken: {
- type: {
- value: { type: String, index: true, unique: true, sparse: true },
- created: Date
- }
- },
- firstName: { type: String, required: true },
- lastName: { type: String, required: true },
- administrator: { type: Boolean, required: true },
- team: Schema.Types.ObjectId,
-}, { timestamps: true, id: false })
+ { timestamps: true, id: false }
+)
userSchema.methods.toClient = function(authUser) {
if (!authUser) {
@@ -42,13 +66,13 @@ userSchema.methods.toClient = function(authUser) {
let user = {
_id: this._id,
email: this.email,
- emailValidated: (!!this.emailToken !== true),
+ emailValidated: !!this.emailToken !== true,
imageId: this.imageId,
thumbnailImageId: this.thumbnailImageId,
firstName: this.firstName,
lastName: this.lastName,
administrator: this.administrator,
- team: this.team
+ team: this.team,
}
return user
diff --git a/version.json5 b/version.json5
index 96d7505..4275de2 100644
--- a/version.json5
+++ b/version.json5
@@ -16,7 +16,7 @@
minor: 0,
patch: 0,
build: 20180413,
- revision: 0,
+ revision: 1,
sequence: 1,
tz: "America/Los_Angeles",
title: "Deighton AR System",
diff --git a/website/src/version.js b/website/src/version.js
index 5ba431a..3a00023 100644
--- a/website/src/version.js
+++ b/website/src/version.js
@@ -1,6 +1,6 @@
export const versionInfo = {
version: '1.0.0',
- fullVersion: '1.0.0-20180413.0',
+ fullVersion: '1.0.0-20180413.1',
title: 'Deighton AR System',
copyright: '© 2018, Kingston Software Solutions.',
supportEmail: 'support@kss.us.com',