diff --git a/services/auth/server/model-config.json b/services/auth/server/model-config.json index c4cb72caa..4593f87fb 100644 --- a/services/auth/server/model-config.json +++ b/services/auth/server/model-config.json @@ -14,23 +14,18 @@ ] }, "User": { - "dataSource": "auth", - "public": true + "dataSource": "auth" }, "AccessToken": { - "dataSource": "auth", - "public": true + "dataSource": "auth" }, "ACL": { - "dataSource": "auth", - "public": true + "dataSource": "auth" }, "RoleMapping": { - "dataSource": "auth", - "public": true + "dataSource": "auth" }, "Role": { - "dataSource": "auth", - "public": true + "dataSource": "auth" } } \ No newline at end of file diff --git a/services/client/server/model-config.json b/services/client/server/model-config.json index 52cde6e4f..e6440b478 100644 --- a/services/client/server/model-config.json +++ b/services/client/server/model-config.json @@ -14,58 +14,53 @@ ] }, "User": { - "dataSource": "auth" + "dataSource": "auth", + "public": false }, "AccessToken": { - "dataSource": "auth" + "dataSource": "auth", + "public": false }, "ACL": { - "dataSource": "auth" + "dataSource": "auth", + "public": false }, "RoleMapping": { - "dataSource": "auth" + "dataSource": "auth", + "public": false }, "Role": { - "dataSource": "auth" + "dataSource": "auth", + "public": false }, "Client": { - "dataSource": "vn", - "public": true + "dataSource": "vn" }, "PayMethod": { - "dataSource": "vn", - "public": true + "dataSource": "vn" }, "ClientObservation": { - "dataSource": "vn", - "public": true + "dataSource": "vn" }, "Address": { - "dataSource": "vn", - "public": true + "dataSource": "vn" }, "AgencyService": { - "dataSource": "vn", - "public": true + "dataSource": "vn" }, "Province": { - "dataSource": "vn", - "public": true + "dataSource": "vn" }, "Country": { - "dataSource": "vn", - "public": true + "dataSource": "vn" }, "Account": { - "dataSource": "vn", - "public": true + "dataSource": "vn" }, "ContactChannel": { - "dataSource": "vn", - "public": true + "dataSource": "vn" }, "Employee": { - "dataSource": "vn", - "public": true + "dataSource": "vn" } } diff --git a/services/salix/server/boot/routes.js b/services/salix/server/boot/routes.js index a590a1218..75ea1dcce 100644 --- a/services/salix/server/boot/routes.js +++ b/services/salix/server/boot/routes.js @@ -30,12 +30,7 @@ module.exports = function (app) { }); }); - function validateToken(tokenId, cb) { - if (!tokenId) { - cb(false); - return; - } - + function validateToken(tokenId, cb) { app.models.AccessToken.findById(tokenId, function(err, token) { if (token) { token.validate (function (err, isValid) { diff --git a/services/salix/server/model-config.json b/services/salix/server/model-config.json index e9dbc87cf..8cef8e458 100644 --- a/services/salix/server/model-config.json +++ b/services/salix/server/model-config.json @@ -14,18 +14,23 @@ ] }, "User": { - "dataSource": "auth" + "dataSource": "auth", + "public": false }, "AccessToken": { - "dataSource": "auth" + "dataSource": "auth", + "public": false }, "ACL": { - "dataSource": "auth" + "dataSource": "auth", + "public": false }, "RoleMapping": { - "dataSource": "auth" + "dataSource": "auth", + "public": false }, "Role": { - "dataSource": "auth" + "dataSource": "auth", + "public": false } }