sails-permissions
Advanced tools
Comparing version 0.10.11 to 0.10.12
@@ -1,3 +0,1 @@ | ||
var _ = require('lodash'); | ||
module.exports = function (sails) { | ||
@@ -13,4 +11,2 @@ return { | ||
}, | ||
@@ -36,3 +32,3 @@ initialize: function (next) { | ||
}) | ||
.catch(function (error) { | ||
.fail(function (error) { | ||
sails.log.error(error); | ||
@@ -68,7 +64,18 @@ next(error); | ||
return require('../../../config/fixtures/user').create(roles, model, function (err, user) { | ||
if (err) return next(err); | ||
if (err) { | ||
sails.log.error(err); | ||
return next(err); | ||
} | ||
sails.log('admin user created. setting owner...'); | ||
user.owner = user.id; | ||
user.save().then(function (user) { | ||
next(); | ||
}); | ||
user.save() | ||
.then(function (user) { | ||
sails.log('admin user done. next...'); | ||
next(); | ||
}) | ||
.fail(function (error) { | ||
sails.log('admin user fail'); | ||
sails.log.error(error); | ||
next(error); | ||
}); | ||
}); | ||
@@ -75,0 +82,0 @@ }) |
@@ -6,3 +6,2 @@ /** | ||
exports.create = function (roles, model, next) { | ||
sails.log('Installing admin User'); | ||
@@ -9,0 +8,0 @@ if (_.isEmpty(sails.config.permissions.adminPassword)) { |
{ | ||
"name": "sails-permissions", | ||
"version": "0.10.11", | ||
"version": "0.10.12", | ||
"description": "Comprehensive sails.js user permission/privilege framework that allows granting and restricting access to models and attributes based on object ownership and relationships with other users and roles", | ||
@@ -41,4 +41,5 @@ "main": "index.js", | ||
"pluralize": "^1.0.1", | ||
"sails-auth": "^0.10.5", | ||
"sails-generate-entities": "^0.10.3" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35950
993
5
+ Addedsails-auth@^0.10.5
+ Addedbase64url@3.0.1(transitive)
+ Addedoauth@0.10.00.9.15(transitive)
+ Addedopenid@0.5.13(transitive)
+ Addedpassport@0.1.180.2.2(transitive)
+ Addedpassport-facebook@1.0.3(transitive)
+ Addedpassport-google@0.3.0(transitive)
+ Addedpassport-http@0.2.2(transitive)
+ Addedpassport-oauth1@1.3.0(transitive)
+ Addedpassport-oauth2@1.8.0(transitive)
+ Addedpassport-openid@0.3.1(transitive)
+ Addedpassport-strategy@1.0.0(transitive)
+ Addedpassport-twitter@1.0.4(transitive)
+ Addedpause@0.0.1(transitive)
+ Addedpkginfo@0.2.3(transitive)
+ Addedsails-auth@0.10.17(transitive)
+ Addeduid2@0.0.4(transitive)
+ Addedutils-merge@1.0.1(transitive)
+ Addedxmldom@0.1.31(transitive)
+ Addedxtraverse@0.1.0(transitive)