Socket
Socket
Sign inDemoInstall

@esri/hub-discussions

Package Overview
Dependencies
Maintainers
0
Versions
284
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@esri/hub-discussions - npm Package Compare versions

Comparing version 27.0.3 to 27.1.0

14

dist/esm/utils/reactions/can-create-reaction.js

@@ -0,1 +1,2 @@

import { canReadChannel } from "../channels";
/**

@@ -9,10 +10,7 @@ * Utility that determines whether a Channel allows a given PostReaction and whether the User has permissions to create it

*/
export function canCreateReaction(channel, value
// user: IUser | IDiscussionsUser = {}
) {
return channelAllowsReaction(channel, value);
// if (!channelAllowsReaction(channel, value)) {
// return false;
// }
// return canReadChannel(channel, user);
export function canCreateReaction(channel, value, user = {}) {
if (!channelAllowsReaction(channel, value)) {
return false;
}
return canReadChannel(channel, user);
}

@@ -19,0 +17,0 @@ function channelAllowsReaction(channel, value) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.canCreateReaction = void 0;
const channels_1 = require("../channels");
/**

@@ -12,10 +13,7 @@ * Utility that determines whether a Channel allows a given PostReaction and whether the User has permissions to create it

*/
function canCreateReaction(channel, value
// user: IUser | IDiscussionsUser = {}
) {
return channelAllowsReaction(channel, value);
// if (!channelAllowsReaction(channel, value)) {
// return false;
// }
// return canReadChannel(channel, user);
function canCreateReaction(channel, value, user = {}) {
if (!channelAllowsReaction(channel, value)) {
return false;
}
return channels_1.canReadChannel(channel, user);
}

@@ -22,0 +20,0 @@ exports.canCreateReaction = canCreateReaction;

@@ -1,2 +0,3 @@

import { PostReaction, IChannel } from "../../types";
import { IUser } from "@esri/arcgis-rest-auth";
import { PostReaction, IChannel, IDiscussionsUser } from "../../types";
/**

@@ -10,2 +11,2 @@ * Utility that determines whether a Channel allows a given PostReaction and whether the User has permissions to create it

*/
export declare function canCreateReaction(channel: IChannel, value: PostReaction): boolean;
export declare function canCreateReaction(channel: IChannel, value: PostReaction, user?: IUser | IDiscussionsUser): boolean;
{
"name": "@esri/hub-discussions",
"version": "27.0.3",
"version": "27.1.0",
"description": "Module to interact with ArcGIS Hub Discussions API in Node.js and modern browsers.",

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

Sorry, the diff of this file is not supported yet

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