From 5ba3083f88ddd8965d65225105d515cfd1ab9bd0 Mon Sep 17 00:00:00 2001 From: Kyle Johnson Date: Mon, 8 Apr 2024 13:01:49 +0100 Subject: [PATCH] fix: Adjust permissions logic for view / manage groups (#3679) --- frontend/common/stores/account-store.js | 2 +- frontend/web/components/App.js | 21 +++++++-- frontend/web/components/OrganisationLink.tsx | 44 ------------------- frontend/web/components/UserGroupList.tsx | 13 +++--- frontend/web/components/modals/Payment.js | 2 +- .../web/components/pages/ConfirmEmailPage.js | 2 +- .../pages/CreateOrganisationPage.js | 2 +- .../pages/EnvironmentSettingsPage.js | 2 +- frontend/web/components/pages/InvitePage.js | 2 +- .../pages/OrganisationSettingsPage.js | 7 +-- .../components/pages/ProjectSettingsPage.js | 4 +- .../web/components/pages/ProjectsPage.tsx | 40 ----------------- .../web/components/pages/SegmentsPage.tsx | 2 +- frontend/web/main.js | 2 +- frontend/web/routes.js | 2 - 15 files changed, 40 insertions(+), 107 deletions(-) delete mode 100644 frontend/web/components/OrganisationLink.tsx delete mode 100644 frontend/web/components/pages/ProjectsPage.tsx diff --git a/frontend/common/stores/account-store.js b/frontend/common/stores/account-store.js index 47eeb7631e32..d2cfc9e4e653 100644 --- a/frontend/common/stores/account-store.js +++ b/frontend/common/stores/account-store.js @@ -52,7 +52,7 @@ const controller = { store.saved() if (isLoginPage) { - window.location.href = `/projects` + window.location.href = `/organisation-settings` } }) .catch((e) => { diff --git a/frontend/web/components/App.js b/frontend/web/components/App.js index 1309552de594..7bf1494cf9be 100644 --- a/frontend/web/components/App.js +++ b/frontend/web/components/App.js @@ -23,7 +23,6 @@ import Icon from './Icon' import AccountStore from 'common/stores/account-store' import InfoMessage from './InfoMessage' import OrganisationLimit from './OrganisationLimit' -import OrganisationLink from './OrganisationLink' import GithubStar from './GithubStar' import Tooltip from './Tooltip' @@ -168,7 +167,7 @@ const App = class extends Component { id: lastEnv.orgId, }) if (!lastOrg) { - this.context.router.history.replace('/projects') + this.context.router.history.replace('/organisation-settings') return } @@ -184,7 +183,7 @@ const App = class extends Component { return } - this.context.router.history.replace('/projects') + this.context.router.history.replace('/organisation-settings') }) } } @@ -349,7 +348,21 @@ const App = class extends Component {