Sails app

This commit is contained in:
Ben Ramey
2014-03-08 18:32:43 -06:00
parent fb64ad1f45
commit 2a34de5580
44 changed files with 5802 additions and 0 deletions

0
api/adapters/.gitkeep Normal file
View File

0
api/controllers/.gitkeep Normal file
View File

0
api/models/.gitkeep Normal file
View File

View File

@@ -0,0 +1,21 @@
/**
* isAuthenticated
*
* @module :: Policy
* @description :: Simple policy to allow any authenticated user
* Assumes that your login action in one of your controllers sets `req.session.authenticated = true;`
* @docs :: http://sailsjs.org/#!documentation/policies
*
*/
module.exports = function(req, res, next) {
// User is allowed, proceed to the next policy,
// or if this is the last policy, the controller
if (req.session.authenticated) {
return next();
}
// User is not allowed
// (default res.forbidden() behavior can be overridden in `config/403.js`)
return res.forbidden('You are not permitted to perform this action.');
};

0
api/services/.gitkeep Normal file
View File