Skip to content

Commit

Permalink
Revert "feat: rbac client side code (#26694)"
Browse files Browse the repository at this point in the history
This reverts commit fc19b77.
  • Loading branch information
zlwaterfield committed Dec 18, 2024
1 parent fc19b77 commit 8841f7f
Show file tree
Hide file tree
Showing 65 changed files with 372 additions and 1,811 deletions.
3 changes: 1 addition & 2 deletions cypress/fixtures/api/notebooks/notebook.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,5 @@
"first_name": "Employee 427",
"email": "[email protected]",
"is_email_verified": null
},
"user_access_level": "editor"
}
}
3 changes: 1 addition & 2 deletions cypress/fixtures/api/notebooks/notebooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@
"first_name": "Employee 427",
"email": "[email protected]",
"is_email_verified": null
},
"user_access_level": "editor"
}
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 1 addition & 4 deletions frontend/src/layout/ErrorProjectUnavailable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { useValues } from 'kea'
import { PageHeader } from 'lib/components/PageHeader'
import { useEffect, useState } from 'react'
import { CreateOrganizationModal } from 'scenes/organization/CreateOrganizationModal'
import { teamLogic } from 'scenes/teamLogic'
import { urls } from 'scenes/urls'
import { userLogic } from 'scenes/userLogic'

Expand All @@ -12,7 +11,6 @@ import { organizationLogic } from '../scenes/organizationLogic'
export function ErrorProjectUnavailable(): JSX.Element {
const { projectCreationForbiddenReason } = useValues(organizationLogic)
const { user } = useValues(userLogic)
const { currentTeam } = useValues(teamLogic)
const [options, setOptions] = useState<JSX.Element[]>([])

useEffect(() => {
Expand Down Expand Up @@ -47,8 +45,7 @@ export function ErrorProjectUnavailable(): JSX.Element {
<PageHeader />
{!user?.organization ? (
<CreateOrganizationModal isVisible inline />
) : (user?.team && !user.organization?.teams.some((team) => team.id === user?.team?.id || user.team)) ||
currentTeam?.user_access_level === 'none' ? (
) : user?.team && !user.organization?.teams.some((team) => team.id === user?.team?.id) ? (
<>
<h1>Project access has been removed</h1>
<p>
Expand Down
8 changes: 1 addition & 7 deletions frontend/src/layout/navigation-3000/sidepanel/SidePanel.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import './SidePanel.scss'

import { IconEllipsis, IconFeatures, IconGear, IconInfo, IconLock, IconNotebook, IconSupport } from '@posthog/icons'
import { IconEllipsis, IconFeatures, IconGear, IconInfo, IconNotebook, IconSupport } from '@posthog/icons'
import { LemonButton, LemonMenu, LemonMenuItems, LemonModal } from '@posthog/lemon-ui'
import clsx from 'clsx'
import { useActions, useValues } from 'kea'
Expand All @@ -16,7 +16,6 @@ import {
import { themeLogic } from '~/layout/navigation-3000/themeLogic'
import { SidePanelTab } from '~/types'

import { SidePanelAccessControl } from './panels/access_control/SidePanelAccessControl'
import { SidePanelActivation, SidePanelActivationIcon } from './panels/activation/SidePanelActivation'
import { SidePanelActivity, SidePanelActivityIcon } from './panels/activity/SidePanelActivity'
import { SidePanelDiscussion, SidePanelDiscussionIcon } from './panels/discussion/SidePanelDiscussion'
Expand Down Expand Up @@ -88,11 +87,6 @@ export const SIDE_PANEL_TABS: Record<
Content: SidePanelStatus,
noModalSupport: true,
},
[SidePanelTab.AccessControl]: {
label: 'Access control',
Icon: IconLock,
Content: SidePanelAccessControl,
},
}

const DEFAULT_WIDTH = 512
Expand Down
Loading

0 comments on commit 8841f7f

Please sign in to comment.