Socket
Socket
Sign inDemoInstall

zeanium-node

Package Overview
Dependencies
Maintainers
1
Versions
142
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zeanium-node - npm Package Compare versions

Comparing version 0.6.41 to 0.6.42

2

package.json
{
"name": "zeanium-node",
"version": "0.6.41",
"version": "0.6.42",
"description": "Zeanium for Node.js, simple http server and custome your business.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -32,2 +32,11 @@ /**

//return isNaN(value) ? ("'"+value+"'") : value;
},
__getSessionId = function (){
if(zn._request){
return zn._request.getSessionValueByKey('id');
}else if(zn._oldRequest) {
return zn._oldRequest.getSessionValueByKey('id');
}else {
return 0;
}
};

@@ -61,3 +70,3 @@

if(value){
//"zn_plugin_admin_user_exist({0}, zn_rights_users, zn_rights_roles) <> 0".format(zn._request.getSessionValueByKey('id'));
//"zn_plugin_admin_user_exist({0}, zn_rights_users, zn_rights_roles) <> 0".format(__getSessionId());
return zn.sql.rights();

@@ -152,3 +161,3 @@ }else {

_values = [];
data.zn_create_user = data.zn_create_user || zn._request.getSessionValueByKey("id") || 0;
data.zn_create_user = data.zn_create_user || __getSessionId();
zn.each(data, function (value, key){

@@ -171,3 +180,3 @@ _keys.push(key);

var _updates = [];
data.zn_modify_user = data.zn_modify_user || zn._request.getSessionValueByKey("id") || 0;
data.zn_modify_user = data.zn_modify_user || __getSessionId();
data.zn_modify_time = data.zn_modify_time || "{{now()}}";

@@ -174,0 +183,0 @@ zn.each(data, function (value, key){

@@ -15,2 +15,10 @@ /**

fields: '*'
}, __getSessionId = function (){
if(zn._request){
return zn._request.getSessionValueByKey('id');
}else if(zn._oldRequest) {
return zn._oldRequest.getSessionValueByKey('id');
}else {
return 0;
}
};

@@ -22,6 +30,6 @@

rights: function (userId){
return " (zn_rights_enabled = 0 or (zn_rights_enabled <> 0 and zn_plugin_admin_user_exist({0}, zn_rights_users, zn_rights_roles) <> 0)) ".format(userId || zn._request.getSessionValueByKey('id'));
return " (zn_rights_enabled = 0 or (zn_rights_enabled <> 0 and zn_plugin_admin_user_exist({0}, zn_rights_users, zn_rights_roles) <> 0)) ".format(userId || __getSessionId());
},
observeRights: function (userId){
return " (zn_rights_enabled = 0 or (zn_rights_enabled <> 0 and zn_plugin_admin_user_exist({0}, zn_rights_observe_users, zn_rights_observe_roles) <> 0)) ".format(userId || zn._request.getSessionValueByKey('id'));
return " (zn_rights_enabled = 0 or (zn_rights_enabled <> 0 and zn_plugin_admin_user_exist({0}, zn_rights_observe_users, zn_rights_observe_roles) <> 0)) ".format(userId || __getSessionId());
},

@@ -28,0 +36,0 @@ paging: function (){

@@ -137,6 +137,11 @@ /**

this._serverResponse.write(_data, inEncode);
zn._oldRequest = zn._request;
zn._oldResponse = zn._response;
zn._request = null;
zn._response = null;
if(zn._request){
zn._oldRequest = zn._request;
zn._request = null;
}
if(zn._response){
zn._oldResponse = zn._response;
zn._response = null;
}
} catch (err) {

@@ -143,0 +148,0 @@ zn.error('Response write error: ' + JSON.stringify(err));

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc