mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-01-15 20:54:31 +00:00
minor permissions related fixes for the new ui.
This commit is contained in:
parent
d1a1e40f29
commit
284d12e32c
@ -14,6 +14,7 @@ export const useUriListForPermissions = () => {
|
||||
processInstanceCreatePath: `/v1.0/process-instances/${params.process_model_id}`,
|
||||
processInstanceErrorEventDetails: `/v1.0/event-error-details/${params.process_model_id}/${params.process_instance_id}`,
|
||||
processInstanceListPath: '/v1.0/process-instances',
|
||||
processInstanceListForMePath: `/v1.0/process-instances/for-me`,
|
||||
processInstanceLogListPath: `/v1.0/logs/${params.process_model_id}/${params.process_instance_id}`,
|
||||
processInstanceReportListPath: '/v1.0/process-instances/reports',
|
||||
processInstanceResetPath: `/v1.0/process-instance-reset/${params.process_model_id}/${params.process_instance_id}`,
|
||||
|
@ -1041,6 +1041,13 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
|
||||
targetUris.messageInstanceListPath
|
||||
);
|
||||
|
||||
const getMessageDisplay = () => {
|
||||
if (canViewMsgs) {
|
||||
return <MessageInstanceList processInstanceId={processInstance.id} />;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
return (
|
||||
<Tabs>
|
||||
<TabList aria-label="List of tabs">
|
||||
@ -1077,9 +1084,7 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
|
||||
processInstanceId={processInstance.id}
|
||||
/>
|
||||
</TabPanel>
|
||||
<TabPanel>
|
||||
<MessageInstanceList processInstanceId={processInstance.id} />
|
||||
</TabPanel>
|
||||
<TabPanel>{getMessageDisplay()}</TabPanel>
|
||||
</TabPanels>
|
||||
</Tabs>
|
||||
);
|
||||
|
@ -70,7 +70,7 @@ export default function ProcessModelShow() {
|
||||
[targetUris.processModelShowPath]: ['PUT', 'DELETE'],
|
||||
[targetUris.processModelTestsPath]: ['POST'],
|
||||
[targetUris.processModelPublishPath]: ['POST'],
|
||||
[targetUris.processInstanceListPath]: ['GET'],
|
||||
[targetUris.processInstanceListForMePath]: ['POST'],
|
||||
[targetUris.processInstanceCreatePath]: ['POST'],
|
||||
[targetUris.processModelFileCreatePath]: ['POST', 'PUT', 'GET', 'DELETE'],
|
||||
};
|
||||
@ -696,7 +696,11 @@ export default function ProcessModelShow() {
|
||||
</Can>
|
||||
</Stack>
|
||||
{processModelFilesSection()}
|
||||
<Can I="GET" a={targetUris.processInstanceListPath} ability={ability}>
|
||||
<Can
|
||||
I="POST"
|
||||
a={targetUris.processInstanceListForMePath}
|
||||
ability={ability}
|
||||
>
|
||||
<ProcessInstanceListTable
|
||||
headerElement={<h2>My Process Instances</h2>}
|
||||
filtersEnabled={false}
|
||||
|
Loading…
x
Reference in New Issue
Block a user