Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apostrophe-schemas

Package Overview
Dependencies
Maintainers
15
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apostrophe-schemas - npm Package Compare versions

Comparing version 0.5.85 to 0.5.86

public/css/restricted.less

8

index.js

@@ -714,2 +714,10 @@ /* jshint node:true */

schema = _.filter(schema, function(field) {
if(!field.permission) {
return true;
}
return self._apos.permissions.can(req, field.permission);
});
// Allow alternate names for fields. Very useful when importing

@@ -716,0 +724,0 @@ // from a previous schema. -Tom

2

package.json
{
"version": "0.5.85",
"version": "0.5.86",
"name": "apostrophe-schemas",

@@ -4,0 +4,0 @@ "description": "Schemas for easy editing of properties in Apostrophe objects",

@@ -9,2 +9,4 @@ /* globals: async, apos, _, aposPages, async, $ */

self.populateFields = function($el, schema, snippet, callback) {
schema = self.allowedSubset($el, schema);
return async.eachSeries(schema, function(field, callback) {

@@ -92,2 +94,4 @@

self.convertFields = function($el, schema, data, callback) {
schema = self.allowedSubset($el, schema);
self.findSafe($el, '[data-name]').removeClass('apos-error').removeClass('apos-error-required').removeClass('apos-error-in-advance').find('.apos-error-message').remove();

@@ -132,2 +136,18 @@ var failing;

self.allowedSubset = function($el, schema) {
return _.filter(schema, function(field) {
if (!field.permission) {
return true;
}
if(apos.data.permissions[field.permission] || apos.data.permissions.admin) {
return true;
}
var $fieldset = self.findFieldset($el, field.name);
$fieldset.addClass('apos-schemas-restricted');
return false;
});
};
self.enableSingleton = function($el, name, area, type, optionsArg, callback) {

@@ -134,0 +154,0 @@ if (typeof(optionsArg) === 'function') {

Sorry, the diff of this file is not supported yet

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