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

transcend-react-legacy

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

transcend-react-legacy - npm Package Compare versions

Comparing version 1.7.4 to 1.7.5

43

lib/app/Permissions.js

@@ -66,5 +66,7 @@ 'use strict';

}), _defineProperty(_PermissionFlags, _ApplicationProducts2.default.newport, {
read: 0x8,
write: 0x10,
manage: 0x20
access: 0x400,
createReports: 0x800,
createSchedules: 0x1000,
runReports: 0x2000,
publishReports: 0x4000
}), _defineProperty(_PermissionFlags, _ApplicationProducts2.default.uhf, {

@@ -99,5 +101,11 @@ read: 0x200,

createAlerts: 'Manage alerts'
}), _defineProperty(_PermissionNames, _ApplicationProducts2.default.newport, {}), _defineProperty(_PermissionNames, _ApplicationProducts2.default.uhf, {}), _defineProperty(_PermissionNames, _ApplicationProducts2.default.gutenberg, {}), _defineProperty(_PermissionNames, _ApplicationProducts2.default.smithers, {}), _PermissionNames);
}), _defineProperty(_PermissionNames, _ApplicationProducts2.default.newport, {
createReports: 'Manage reports',
createSchedules: 'Manage schedules',
runReports: 'Run reports',
publishReports: 'Publish reports'
}), _defineProperty(_PermissionNames, _ApplicationProducts2.default.uhf, {}), _defineProperty(_PermissionNames, _ApplicationProducts2.default.gutenberg, {}), _defineProperty(_PermissionNames, _ApplicationProducts2.default.smithers, {}), _PermissionNames);
var LegacyApps = exports.LegacyApps = (_LegacyApps = {}, _defineProperty(_LegacyApps, _ApplicationProducts2.default.newport, true), _defineProperty(_LegacyApps, _ApplicationProducts2.default.uhf, true), _defineProperty(_LegacyApps, _ApplicationProducts2.default.gutenberg, true), _defineProperty(_LegacyApps, _ApplicationProducts2.default.smithers, true), _LegacyApps);
// NOTE: we can get rid of that dictionary once all the apps are migrated
var LegacyApps = exports.LegacyApps = (_LegacyApps = {}, _defineProperty(_LegacyApps, _ApplicationProducts2.default.uhf, true), _defineProperty(_LegacyApps, _ApplicationProducts2.default.gutenberg, true), _defineProperty(_LegacyApps, _ApplicationProducts2.default.smithers, true), _LegacyApps);

@@ -183,5 +191,28 @@ var Permissions = function () {

return !bitwise.test(PermissionFlags[product].write, this.accessMask) && !bitwise.test(PermissionFlags[product].manage, this.accessMask);
var accessMask = _lodash2.default.isUndefined(customAccessMask) ? this.accessMask : customAccessMask;
return !bitwise.test(PermissionFlags[product].write, accessMask) && !bitwise.test(PermissionFlags[product].manage, accessMask);
}
}, {
key: 'hasNoAccess',
value: function hasNoAccess(productName, customAccessMask) {
if (this.isSuperAdmin(customAccessMask) || this.isAgencyAdmin(customAccessMask)) {
return false;
}
var product = (productName || _Application2.default.currentProduct).toLowerCase();
if (!_ApplicationProducts2.default[product]) {
return true;
}
if (!LegacyApps[product]) {
var productPermissions = this.getProductPermissionFlags(productName, customAccessMask);
return !Object.keys(productPermissions).find(function (key) {
return productPermissions[key];
});
}
var accessMask = _lodash2.default.isUndefined(customAccessMask) ? this.accessMask : customAccessMask;
return !bitwise.test(PermissionFlags[product].read, accessMask) && !bitwise.test(PermissionFlags[product].write, accessMask) && !bitwise.test(PermissionFlags[product].manage, accessMask);
}
/**

@@ -188,0 +219,0 @@ * Returns true if specified product is read only for the current user; otherwise, false.

2

package.json
{
"name": "transcend-react-legacy",
"version": "1.7.4",
"version": "1.7.5",
"description": "LEGACY Transcend-react is a component library for NUVI",

@@ -5,0 +5,0 @@ "main": "lib/main",

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