From cfa9cac2d59dc316e63eac77e26344edd3e96a19 Mon Sep 17 00:00:00 2001 From: Uttam Krishna Ukkoji Date: Tue, 23 Mar 2021 10:16:24 +0530 Subject: [PATCH] fix: :bug: Organization function accessible to 'is_owner'. --- CHANGELOG.md | 10 ++++++---- lib/organization/index.js | 2 +- package-lock.json | 2 +- package.json | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96ad4348..8094bb03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,17 @@ # Changelog - -## [v1.2.0](https://github.com/contentstack/contentstack-management-javascript/tree/v1.2.0) (.....) +## [v1.2.1](https://github.com/contentstack/contentstack-management-javascript/tree/v1.2.1) (2021-03-19) + - Bug Fix + - User get details: Include organization functions for `is_owner` of the organization +## [v1.2.0](https://github.com/contentstack/contentstack-management-javascript/tree/v1.2.0) (2021-03-12) - Bug Fix - Release Items issue for API key resolved - - Enhanchment + - Enhancement - Request concurrency added in SDK - New Feature - Workflow module support added ## [v1.1.2](https://github.com/contentstack/contentstack-management-javascript/tree/v1.1.2) (2021-01-07) - Bug Fix - - Retry count on multiple request failuer + - Retry count on multiple request failure ## [v1.1.1](https://github.com/contentstack/contentstack-management-javascript/tree/v1.1.1) (2020-10-23) - Bug Fix - Stack initialization issue diff --git a/lib/organization/index.js b/lib/organization/index.js index 5f2107a3..e20377c3 100644 --- a/lib/organization/index.js +++ b/lib/organization/index.js @@ -32,7 +32,7 @@ export function Organization (http, data) { */ this.fetch = fetch(http, 'organization') - if ((this.org_roles && (this.org_roles.filter(function (role) { return role.admin === true }).length > 0)) || (this.owner && this.owner === true)) { + if ((this.org_roles && (this.org_roles.filter(function (role) { return role.admin === true }).length > 0)) || (this.owner && this.owner === true) || (this.is_owner && this.is_owner === true)) { /** * @description The Get all stacks in an organization call fetches the list of all stacks in an Organization. * @memberof Organization diff --git a/package-lock.json b/package-lock.json index 0d28613b..0a362f9c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@contentstack/management", - "version": "1.2.0", + "version": "1.2.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 3549f1f4..27976c5a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@contentstack/management", - "version": "1.2.0", + "version": "1.2.1", "description": "The Content Management API is used to manage the content of your Contentstack account", "main": "dist/node/contentstack-management.js", "browser": "dist/web/contentstack-management.js",