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

@icgc-argo/ego-token-utils

Package Overview
Dependencies
Maintainers
8
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@icgc-argo/ego-token-utils - npm Package Compare versions

Comparing version 8.1.1 to 8.2.0

14

dist/argoRoleChecks.d.ts
export declare const DCC_ADMIN_PERMISSION = "PROGRAMSERVICE.WRITE";
export declare const RDPC_PREFIX = "RDPC-";
export declare const DACO_ADMIN_PERMISSION = "DACO-REVIEW.WRITE";
/**
* check if a given jwt has dcc access
* @param egoJwt
* check if a given set of permissions has dcc access
* @param permissions
*/
export declare const isDccMember: (permissions: string[]) => boolean;
/**
* check if a given jwt has rdpc access
* @param egoJwt
* check if a given set of permissions has rdpc access
* @param permissions
*/
export declare const isRdpcMember: (permissions: string[]) => boolean;
/**
* check if a given set of permissions has daco admin access
* @param permissions
*/
export declare const isDacoAdmin: (permissions: string[]) => boolean;

@@ -16,2 +16,3 @@ import { PermissionScopeObj } from './common';

isRdpcMember: (permissions: string[]) => boolean;
isDacoAdmin: (permissions: string[]) => boolean;
getPermissionsFromToken: (egoJwt: string) => string[];

@@ -18,0 +19,0 @@ getReadableProgramScopes: (permissions: string[]) => PermissionScopeObj[];

@@ -25,5 +25,6 @@ "use strict";

exports.RDPC_PREFIX = 'RDPC-';
exports.DACO_ADMIN_PERMISSION = 'DACO-REVIEW.WRITE';
/**
* check if a given jwt has dcc access
* @param egoJwt
* check if a given set of permissions has dcc access
* @param permissions
*/

@@ -34,4 +35,4 @@ exports.isDccMember = function (permissions) {

/**
* check if a given jwt has rdpc access
* @param egoJwt
* check if a given set of permissions has rdpc access
* @param permissions
*/

@@ -56,2 +57,9 @@ exports.isRdpcMember = function (permissions) {

};
/**
* check if a given set of permissions has daco admin access
* @param permissions
*/
exports.isDacoAdmin = function (permissions) {
return permissions.includes(exports.DACO_ADMIN_PERMISSION);
};
//# sourceMappingURL=argoRoleChecks.js.map

@@ -224,2 +224,3 @@ "use strict";

isRdpcMember: argoRoleChecks_1.isRdpcMember,
isDacoAdmin: argoRoleChecks_1.isDacoAdmin,
getPermissionsFromToken: getPermissionsFromToken(egoPublicKey),

@@ -226,0 +227,0 @@ getReadableProgramScopes: getReadableProgramScopes,

export declare const DCC_ADMIN_PERMISSION = "PROGRAMSERVICE.WRITE";
export declare const RDPC_PREFIX = "RDPC-";
export declare const DACO_ADMIN_PERMISSION = "DACO-REVIEW.WRITE";
/**
* check if a given jwt has dcc access
* @param egoJwt
* check if a given set of permissions has dcc access
* @param permissions
*/
export declare const isDccMember: (permissions: string[]) => boolean;
/**
* check if a given jwt has rdpc access
* @param egoJwt
* check if a given set of permissions has rdpc access
* @param permissions
*/
export declare const isRdpcMember: (permissions: string[]) => boolean;
/**
* check if a given set of permissions has daco admin access
* @param permissions
*/
export declare const isDacoAdmin: (permissions: string[]) => boolean;

@@ -16,2 +16,3 @@ import { PermissionScopeObj } from './common';

isRdpcMember: (permissions: string[]) => boolean;
isDacoAdmin: (permissions: string[]) => boolean;
getPermissionsFromToken: (egoJwt: string) => string[];

@@ -18,0 +19,0 @@ getReadableProgramScopes: (permissions: string[]) => PermissionScopeObj[];

{
"name": "@icgc-argo/ego-token-utils",
"version": "8.1.1",
"version": "8.2.0",
"description": "",

@@ -5,0 +5,0 @@ "keywords": [],

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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