From 23bbb817bdb40551f0e30833b21886f36aaa7eea Mon Sep 17 00:00:00 2001 From: Wizzer Date: Tue, 6 Dec 2016 11:05:37 +0800 Subject: [PATCH] update: sails v0.12.11 --- README.md | 15 +++++++++++---- api/policies/sessionAuth.js | 6 +++--- config/custom/mysql.js | 2 +- config/custom/redis.js | 3 ++- config/custom/system.js | 6 +++--- package.json | 32 ++++++++++++++++---------------- 6 files changed, 36 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 83699e4..c670286 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -NodeWk 1.0 +NodeWk 1.0.3 ====== 基于Sails.js MVC开发,实现常用的系统、微信、CMS等功能 @@ -7,18 +7,20 @@ PS:如果对Java开发框架感兴趣,可以看这里:https://github.com/W 在线演示地址 ====== -http://www.nodeshop.cn/sysadmin NodeWk 1.0 +https://www.nodeshop.cn/sysadmin NodeWk 演示地址(node) + +https://nutzwk.wizzer.cn NutzWk 演示地址(java) ====== 基于Sailsjs的Node.js开源企业级开发框架 -NodeWk 1.0 运行环境: +NodeWk 1.0.x 运行环境: * Node 最新版 * Redis 最新版 * MySql 5.x -NodeWk 1.0 特性: +NodeWk 1.0.x 特性: * 集成Email服务(nodemailer) * 集成定时任务(node-schedule) * 集成验证码插件(captchapng) @@ -44,4 +46,9 @@ NodeWk 1.0 特性: * 用户名:superadmin 密码:1 +其他说明: +* /api/policies/sessionAuth.js 后台权限验证 +* /api/policies/oauthAuth.js API TOKEN权限验证 + + diff --git a/api/policies/sessionAuth.js b/api/policies/sessionAuth.js index 9fff737..45dd730 100644 --- a/api/policies/sessionAuth.js +++ b/api/policies/sessionAuth.js @@ -4,9 +4,9 @@ */ module.exports = function (req, res, next) { if (req.url.lastIndexOf('/pie.htc')>0)return res.end(''); - if(req.url.indexOf('delete')>0||req.url.indexOf('doChangePassword')>0||req.url.indexOf('resetPwd')>0||req.url.indexOf('editDo')>0||req.url.indexOf('addDo')>0||req.url.indexOf('editMenuDo')>0||req.url.indexOf('disable')>0||req.url.indexOf('enable')>0||req.url.indexOf('delUser')>0){ - return res.json({code:1,msg:'被禁止的操作'}); - } + // if(req.url.indexOf('delete')>0||req.url.indexOf('doChangePassword')>0||req.url.indexOf('resetPwd')>0||req.url.indexOf('editDo')>0||req.url.indexOf('addDo')>0||req.url.indexOf('editMenuDo')>0||req.url.indexOf('disable')>0||req.url.indexOf('enable')>0||req.url.indexOf('delUser')>0){ + // return res.json({code:1,msg:'被禁止的操作'}); + // } if (req.options.controller.indexOf('private/') == 0 && req.options.controller.indexOf('private/login') < 0) { if (req.url == '/favicon.ico')return res.end(''); if (req.session.auth && !req.session.user.disabled) { diff --git a/config/custom/mysql.js b/config/custom/mysql.js index ba5365b..196e1d8 100644 --- a/config/custom/mysql.js +++ b/config/custom/mysql.js @@ -5,7 +5,7 @@ module.exports.mysql = { host: '127.0.0.1', user: 'root', password: 'root', - database: 'nodecms', + database: 'nw', pool: true, connectionLimit: 50, waitForConnections: true diff --git a/config/custom/redis.js b/config/custom/redis.js index ea57f88..4faae26 100644 --- a/config/custom/redis.js +++ b/config/custom/redis.js @@ -1,8 +1,9 @@ /** + * auth_pass Redis连接密码 * Created by root on 9/17/15. */ module.exports.redis = { host: '127.0.0.1', port: 6379, - auth_pass: '@#etpass' + auth_pass: '' }; diff --git a/config/custom/system.js b/config/custom/system.js index 67edf1a..c9739bf 100644 --- a/config/custom/system.js +++ b/config/custom/system.js @@ -3,10 +3,10 @@ */ module.exports.system = { AppBase:'', - AppName:'上城内容管理系统', - AppDomain:'wizzer.wicp.net', + AppName:'NodeWk', + AppDomain:'www.nodeshop.cn', AppIp:'127.0.0.1', - AppShrotName:'上城CMS', + AppShrotName:'NodeWk', AppCopyright:'Wizzer.cn', UploadPath:'/upload', MyConfig:{}, diff --git a/package.json b/package.json index 71713b9..4264f9a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "nodeshop", + "name": "nodewk", "private": true, - "version": "0.1.0", + "version": "0.1.1", "description": "NodeWk", "keywords": [], "dependencies": { @@ -12,20 +12,20 @@ "ejs": "2.3.4", "emoji": "^0.3.2", "gm": "^1.21.1", - "grunt": "0.4.5", - "grunt-contrib-clean": "0.6.0", - "grunt-contrib-coffee": "0.13.0", - "grunt-contrib-concat": "0.5.1", - "grunt-contrib-copy": "0.5.0", - "grunt-contrib-cssmin": "0.9.0", - "grunt-contrib-jst": "0.6.0", - "grunt-contrib-less": "1.1.0", - "grunt-contrib-uglify": "0.7.0", - "grunt-contrib-watch": "0.5.3", + "grunt": "1.0.1", + "grunt-contrib-clean": "1.0.0", + "grunt-contrib-coffee": "1.0.0", + "grunt-contrib-concat": "1.0.1", + "grunt-contrib-copy": "1.0.0", + "grunt-contrib-cssmin": "1.0.1", + "grunt-contrib-jst": "1.0.0", + "grunt-contrib-less": "1.3.0", + "grunt-contrib-uglify": "1.0.1", + "grunt-contrib-watch": "1.0.0", "grunt-sails-linker": "~0.10.1", - "grunt-sync": "0.2.4", + "grunt-sync": "0.5.2", "image-size": "^0.4.0", - "include-all": "~0.1.6", + "include-all": "^1.0.0", "jszip": "^3.0.0", "jwt-simple": "^0.5.0", "md5": "^2.0.0", @@ -37,10 +37,10 @@ "nodemailer-smtp-transport": "^1.0.3", "rc": "1.0.1", "redis": "^2.5.0-1", - "sails": "~0.12.1", + "sails": "~0.12.11", "sails-disk": "~0.10.9", "sails-hook-autoreload": "^0.13.0", - "sails-mysql": "^0.11.3", + "sails-mysql": "^0.12.2", "sails-redis": "^0.10.7", "sha1": "^1.1.1", "urllib": "^2.8.0",