Updating models
This commit is contained in:
parent
9fe79dbfca
commit
b4391e6b26
|
@ -41,3 +41,5 @@ var ACLSchema = {
|
||||||
created: Date,
|
created: Date,
|
||||||
lastUpdated: Date
|
lastUpdated: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// readAccess, writeAccess --> public, userId, role
|
|
@ -1,17 +1,26 @@
|
||||||
// Application model
|
/**
|
||||||
|
* Data model for Application
|
||||||
|
*/
|
||||||
var ApplicationSchema = {
|
var ApplicationSchema = {
|
||||||
|
|
||||||
// Basic information
|
// Basic information
|
||||||
id: {type: String, required: true},
|
id: {type: String, required: true},
|
||||||
name: {type: String, required: true},
|
name: {type: String, required: true},
|
||||||
description: String, // description
|
description: String, // description
|
||||||
icon: String, // The icon url
|
icon: String, // The icon image url
|
||||||
public: Boolean,
|
|
||||||
|
public: Boolean, // Do we list the application in the public catalog?
|
||||||
permissions: [String],
|
permissions: [String],
|
||||||
|
|
||||||
userId: String,
|
owner: String, // The user id of the developer who registers the application
|
||||||
|
collaborators: [String], // A list of users ids who have permissions to work on this app
|
||||||
|
|
||||||
status: String,
|
// EMail
|
||||||
|
email: String, // e-mail address
|
||||||
|
emailVerified: Boolean, // Is the e-mail verified
|
||||||
|
|
||||||
|
|
||||||
|
status: String, // Status of the application, enabled/disabled
|
||||||
|
|
||||||
// Keys
|
// Keys
|
||||||
clientKey: String,
|
clientKey: String,
|
||||||
|
@ -24,18 +33,24 @@ var ApplicationSchema = {
|
||||||
pushPlatforms: [String],
|
pushPlatforms: [String],
|
||||||
pushCredentials: [],
|
pushCredentials: [],
|
||||||
|
|
||||||
// Authentication
|
// User Authentication
|
||||||
authenticationEnabled: Boolean,
|
authenticationEnabled: Boolean,
|
||||||
anonymousAllowed: Boolean,
|
anonymousAllowed: Boolean,
|
||||||
schemes: [String], // Basic, facebook, github, google
|
schemes: [String], // Basic, facebook, github, google
|
||||||
attachedCredentials: [],
|
attachedCredentials: [],
|
||||||
|
|
||||||
// email
|
|
||||||
email: String, // e-mail address
|
|
||||||
emailVerified: Boolean, // Is the e-mail verified
|
|
||||||
|
|
||||||
collaborators: [String], // A list of users ids who have permissions to work on this app
|
|
||||||
|
|
||||||
created: Date,
|
created: Date,
|
||||||
lastUpdated: Date
|
lastUpdated: Date
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Application management functions
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Register a new application
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,17 @@
|
||||||
// See Device registration
|
// See Device registration
|
||||||
var InstallationSchema = {
|
var InstallationSchema = {
|
||||||
|
id: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
appId: String,
|
||||||
|
appVersion: String,
|
||||||
|
userId: String,
|
||||||
|
deviceToken: String,
|
||||||
|
deviceType: String,
|
||||||
|
subscriptions: [String],
|
||||||
|
created: Date,
|
||||||
|
lastModified: Date,
|
||||||
|
status: String
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
// Role model
|
// Role model
|
||||||
var RoleSchema = {
|
var RoleSchema = {
|
||||||
id: {type: String, required: true},
|
id: {type: String, required: true},
|
||||||
name: {type: String, required: true},
|
name: {type: String, required: true}, // The name of a role
|
||||||
|
description: String,
|
||||||
roles: [String], // A role can be an aggregate of other roles
|
roles: [String], // A role can be an aggregate of other roles
|
||||||
users: [String], // A role contains a list of users
|
users: [String], // A role contains a list of users
|
||||||
|
|
||||||
created: Date,
|
created: Date,
|
||||||
lastUpdated: Date
|
lastUpdated: Date
|
||||||
}
|
}
|
|
@ -1,3 +1,24 @@
|
||||||
|
/**
|
||||||
|
* User Model
|
||||||
|
Active User
|
||||||
|
Explicit vs. Implicit
|
||||||
|
Signup
|
||||||
|
Removing the User from the System
|
||||||
|
Login
|
||||||
|
Logout
|
||||||
|
User Management
|
||||||
|
Email Verification
|
||||||
|
Password Reset
|
||||||
|
Forgot Username
|
||||||
|
Using Social Identities
|
||||||
|
Facebook
|
||||||
|
Google+
|
||||||
|
LinkedIn
|
||||||
|
Twitter
|
||||||
|
User Discovery
|
||||||
|
Username Existence Check
|
||||||
|
* @type {{question: *, answer: *}}
|
||||||
|
*/
|
||||||
var ChallengeSchema = {
|
var ChallengeSchema = {
|
||||||
// id: String,
|
// id: String,
|
||||||
question: String,
|
question: String,
|
||||||
|
|
Loading…
Reference in New Issue