From 7686c704100c59921d90bcd8ffcd1d2db7cb4d66 Mon Sep 17 00:00:00 2001 From: Prerna Mehra Date: Wed, 8 Sep 2021 04:19:30 +0530 Subject: [PATCH] Fix: Update CLP for new class (#1785) * update CLP for new class * update changelog.md Co-authored-by: Manuel <5673677+mtrezza@users.noreply.github.com> --- CHANGELOG.md | 1 + src/lib/stores/SchemaStore.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed501ae24..6f6aea3f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - fix: date cell value not selected on double clicks (fn-faisal) [#1730](https://github.com/parse-community/parse-dashboard/pull/1730) ## Fixes +- Fixed bug after creating new class, wrong CLP was shown for that class [#1784](https://github.com/parse-community/parse-dashboard/issues/1784) (Prerna Mehra) [#1785](https://github.com/parse-community/parse-dashboard/pull/1785) - Fixed bug when opening a big modal, modal content is not visible due to Sidebar (Prerna Mehra) [#1777](https://github.com/parse-community/parse-dashboard/pull/1778) - Fixed UI for a field containing an array of pointers (Prerna Mehra) [#1776](https://github.com/parse-community/parse-dashboard/pull/1776) - Fixed bug when editing or copying a field containing an array of pointers [#1770](https://github.com/parse-community/parse-dashboard/issues/1770) (Prerna Mehra) [#1771](https://github.com/parse-community/parse-dashboard/pull/1771) diff --git a/src/lib/stores/SchemaStore.js b/src/lib/stores/SchemaStore.js index 6e433fcfe..2faf186dd 100644 --- a/src/lib/stores/SchemaStore.js +++ b/src/lib/stores/SchemaStore.js @@ -55,10 +55,10 @@ function SchemaStore(state, action) { 'schemas/' + action.className, { className: action.className }, { useMasterKey: true } - ).then(({ fields }) => { + ).then(({ fields, classLevelPermissions }) => { return state .setIn(['classes', action.className], Map(fields)) - .setIn(['CLPs', action.className], Map({})); + .setIn(['CLPs', action.className], Map(classLevelPermissions)); }); case ActionTypes.DROP_CLASS: return action.app.apiRequest(