Skip to content

Commit

Permalink
don't display temlate page if readonly and access revoked (#2499)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbishel authored Mar 10, 2022
1 parent 5e41c23 commit 61f1a3c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions webapp/src/pages/boardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,16 @@ const BoardPage = (props: Props): JSX.Element => {
<div className='error'>
{intl.formatMessage({id: 'BoardPage.syncFailed', defaultMessage: 'Board may be deleted or access revoked.'})}
</div>}
<Workspace
readonly={props.readonly || false}
/>

{

// Don't display Templates page
// if readonly mode and no board defined.
(!props.readonly || board !== undefined) &&
<Workspace
readonly={props.readonly || false}
/>
}
</div>
)
}
Expand Down

0 comments on commit 61f1a3c

Please sign in to comment.