Skip to content

Commit

Permalink
Merge pull request #342 from ucdavis/JCS/EditorCreateFolder
Browse files Browse the repository at this point in the history
Team edit can create folders
  • Loading branch information
jSylvestre authored Apr 10, 2024
2 parents 85d9bb7 + 289719f commit 8a4b8dd
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Finjector.Web/ClientApp/src/components/Teams/TeamTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ const TeamTitle: React.FC<TeamTitleProps> = ({
(p) => p === "Admin"
);

const isTeamEditor = teamModelData.team.myTeamPermissions.some(
(p) => p === "Edit"
);

const limitedTeam = teamModelData.team.isPersonal; // personal teams are limited

return (
Expand All @@ -72,6 +76,20 @@ const TeamTitle: React.FC<TeamTitleProps> = ({
</FinButton>
</FinButtonDropdownItem>
))}
{!limitedTeam && isTeamEditor && !isTeamAdmin && (
<>
{" "}
<FinButtonDropdownItem>
<FinButton
borderless={true}
to={`/teams/${teamId}/folders/create`}
>
<FontAwesomeIcon icon={faPlus} />
Create New Folder
</FinButton>
</FinButtonDropdownItem>
</>
)}
{!limitedTeam && isTeamAdmin && (
<>
<FinButtonDropdownItem>
Expand Down

0 comments on commit 8a4b8dd

Please sign in to comment.