fix: workspace roles for settings and members button (#6574)

* fix: workspace roles for settings and members button

* fix: user role and member count for new workspace

* chore: set role to 20 while workspace creation

---------

Co-authored-by: Prateek Shourya <prateekshourya29@gmail.com>
This commit is contained in:
Akshita Goyal 2025-02-10 15:03:50 +05:30 committed by GitHub
parent 5096a15051
commit a2328d0cbe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 11 additions and 23 deletions

View file

@ -67,7 +67,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
<link rel="preload" href={`${API_BASE_URL}/api/users/me/settings/ `} as="fetch" crossOrigin="use-credentials" />
<link
rel="preload"
href={`${API_BASE_URL}/api/users/me/workspaces/`}
href={`${API_BASE_URL}/api/users/me/workspaces/?v=${Date.now()}`}
as="fetch"
crossOrigin="use-credentials"
/>

View file

@ -85,7 +85,7 @@ const SidebarDropdownItem = observer((props: TProps) => {
</div>
{workspace.id === activeWorkspace?.id && (
<>
{workspace?.role > EUserPermissions.GUEST && (
{workspace?.role === EUserPermissions.ADMIN && (
<div className="mt-2 mb-1 flex gap-2">
<Link
href={`/${workspace.slug}/settings`}