hola-server 0.4.6 → 0.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/core/meta.js +3 -3
  2. package/package.json +1 -1
package/core/meta.js CHANGED
@@ -15,7 +15,7 @@ const meta_manager = {};
15
15
  * link property: field link property link to entity field and the field should ref to an entity.
16
16
  * and the field name should be the same with the ref entity field name and shouldn't make as required and no other property
17
17
  */
18
- const field_attrs = ["name", "type", "required", "ref", "link", "delete", "create", "list", "search", "update", "clone", "sys"];
18
+ const field_attrs = ["name", "type", "required", "ref", "link", "delete", "create", "list", "search", "update", "clone", "sys", "secure"];
19
19
  const meta_attrs = ["collection", "primary_keys", "fields", "creatable", "readable", "updatable", "deleteable", "cloneable", "after_read",
20
20
  "before_create", "after_create", "before_clone", "after_clone", "before_update", "after_update", "before_delete", "after_delete", "create", "clone", "update", "batch_update", "after_batch_update", "delete",
21
21
  "ref_label", "ref_filter", "route", "user_field"];
@@ -218,12 +218,12 @@ class EntityMeta {
218
218
  this.field_names = this.fields.map(field => field.name);
219
219
  this.user_field = meta.user_field;
220
220
 
221
- this.property_fields = this.fields.filter(field => field.sys != true);
221
+ this.property_fields = this.fields.filter(field => field.sys != true && field.secure != true);
222
222
  this.create_fields = this.fields.filter(field => field.create != false && field.sys != true);
223
223
  this.update_fields = this.fields.filter(field => field.create != false && field.update != false && field.sys != true);
224
224
  this.search_fields = this.fields.filter(field => field.search != false && field.sys != true);
225
225
  this.clone_fields = this.fields.filter(field => field.clone != false && field.sys != true);
226
- this.list_fields = this.fields.filter(field => field.list != false && field.sys != true);
226
+ this.list_fields = this.fields.filter(field => field.list != false && field.sys != true && field.secure != true);
227
227
  this.primary_key_fields = this.fields.filter(field => meta.primary_keys.includes(field.name));
228
228
  this.required_field_names = this.fields.filter(field => field.required == true || this.primary_keys.includes(field.name)).map(field => field.name);
229
229
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hola-server",
3
- "version": "0.4.6",
3
+ "version": "0.4.7",
4
4
  "description": "a meta programming framework used to build nodejs restful api",
5
5
  "main": "index.js",
6
6
  "scripts": {