Only show allocation if user has permission

prevents just a blank scetion in the details box if a sub user dosn't have the permission of `allocation.read`

Also fixes the server router where it was set to `allocations` and not `allocation` making it not showup period even if the sub user had the correct permissions.
This commit is contained in:
Charles Morgan 2020-11-02 00:49:07 -05:00
parent fc0f8ee48e
commit c75a621c52
No known key found for this signature in database
GPG key ID: D71946CD723249BD
2 changed files with 10 additions and 7 deletions

View file

@ -100,7 +100,7 @@ const ServerRouter = ({ match, location }: RouteComponentProps<{ id: string }>)
<Can action={'backup.*'}>
<NavLink to={`${match.url}/backups`}>Backups</NavLink>
</Can>
<Can action={'allocations.*'}>
<Can action={'allocation.*'}>
<NavLink to={`${match.url}/network`}>Network</NavLink>
</Can>
<Can action={'startup.*'}>