diff --git a/CHANGELOG.md b/CHANGELOG.md index f1a3c5dc8..44a1c39fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,9 @@ All notable changes to this project will be documented in this file. The format sorting). - Fixed the API base URL on the API spec page. - Fixed outside click detection for dropdown menus. +- Regular team members are now also allowed to update key results within ended + periods. This is a simplification and fixes a bug where some users couldn't + update key results for objectives with an individual start and end date. ### Security diff --git a/src/store/index.js b/src/store/index.js index 5e550a7b7..75851940a 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -67,24 +67,6 @@ export const storeGetters = { return activeItem.team.map(({ id }) => id).includes(user.id); }, - allowedToEditPeriod: (state) => { - const { user, activePeriod, activeItem } = state; - const { organization } = activeItem; - - const isAdminOfOrganization = organization - ? user.admin && user.admin.includes(organization.id) - : user.admin && user.admin.includes(activeItem.id); - - if (user && user.superAdmin) { - return true; - } - if (isAdminOfOrganization) { - return true; - } - - return activePeriod.endDate.toDate() > new Date(); - }, - sidebarGroups: (state) => { const { organizations, departments, products, activeItem } = state; diff --git a/src/views/KeyResultHome.vue b/src/views/KeyResultHome.vue index 834e7362c..67d4e46ab 100644 --- a/src/views/KeyResultHome.vue +++ b/src/views/KeyResultHome.vue @@ -59,7 +59,7 @@ - +