Hide settings items for non admins
Update image uploader for use with team logo Fix can't cancel cropping modal
This commit is contained in:
@ -29,8 +29,8 @@ class SettingsSidebar extends React.Component<Props> {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { team } = this.props.auth;
|
||||
if (!team) return;
|
||||
const { team, user } = this.props.auth;
|
||||
if (!team || !user) return;
|
||||
|
||||
return (
|
||||
<Sidebar>
|
||||
@ -54,21 +54,25 @@ class SettingsSidebar extends React.Component<Props> {
|
||||
</Section>
|
||||
<Section>
|
||||
<Header>Team</Header>
|
||||
<SidebarLink to="/settings/details" icon={<SettingsIcon />}>
|
||||
Details
|
||||
</SidebarLink>
|
||||
{user.isAdmin && (
|
||||
<SidebarLink to="/settings/details" icon={<SettingsIcon />}>
|
||||
Details
|
||||
</SidebarLink>
|
||||
)}
|
||||
<SidebarLink to="/settings/members" icon={<UserIcon />}>
|
||||
Members
|
||||
</SidebarLink>
|
||||
<SidebarLink to="/settings/shares" icon={<LinkIcon />}>
|
||||
Share Links
|
||||
</SidebarLink>
|
||||
<SidebarLink
|
||||
to="/settings/integrations/slack"
|
||||
icon={<SettingsIcon />}
|
||||
>
|
||||
Integrations
|
||||
</SidebarLink>
|
||||
{user.isAdmin && (
|
||||
<SidebarLink
|
||||
to="/settings/integrations/slack"
|
||||
icon={<SettingsIcon />}
|
||||
>
|
||||
Integrations
|
||||
</SidebarLink>
|
||||
)}
|
||||
</Section>
|
||||
</Scrollable>
|
||||
</Flex>
|
||||
|
Reference in New Issue
Block a user