Add RBAC to org views

This commit is contained in:
mabashian
2019-04-18 13:31:03 -04:00
parent 1509ef3e80
commit 5ae7cbb43a
14 changed files with 315 additions and 98 deletions

View File

@@ -100,7 +100,8 @@ class OrganizationDetail extends Component {
description,
custom_virtualenv,
created,
modified
modified,
summary_fields
},
match
} = this.props;
@@ -165,11 +166,13 @@ class OrganizationDetail extends Component {
</TextContent>
)}
</div>
<div style={{ display: 'flex', flexDirection: 'row-reverse', marginTop: '20px' }}>
<Link to={`/organizations/${match.params.id}/edit`}>
<Button><Trans>Edit</Trans></Button>
</Link>
</div>
{summary_fields.user_capabilities.edit && (
<div style={{ display: 'flex', flexDirection: 'row-reverse', marginTop: '20px' }}>
<Link to={`/organizations/${match.params.id}/edit`}>
<Button><Trans>Edit</Trans></Button>
</Link>
</div>
)}
{error ? 'error!' : ''}
</CardBody>
)}