feat: improve UI display depending on user persmissions

This commit is contained in:
kasia.oczkowska
2024-02-02 12:11:58 +00:00
committed by Ali BARIN
parent 017a881494
commit 5d2e9ccc67
5 changed files with 145 additions and 76 deletions

View File

@@ -84,10 +84,14 @@ export default function Applications() {
)}
{!isLoading && !hasApps && (
<NoResultFound
text={formatMessage('apps.noConnections')}
to={URLS.NEW_APP_CONNECTION}
/>
<Can I="create" a="Connection" passThrough>
{(allowed) => (
<NoResultFound
text={formatMessage('apps.noConnections')}
{...(allowed && { to: URLS.NEW_APP_CONNECTION })}
/>
)}
</Can>
)}
{!isLoading &&