feat: Implement permission catalog API endpoint

This commit is contained in:
Faruk AYDIN
2024-02-21 17:52:51 +01:00
parent f135a0f09e
commit 84a0b37fcc
6 changed files with 122 additions and 1 deletions

View File

@@ -0,0 +1,64 @@
const getPermissionsCatalogMock = async () => {
const data = {
actions: [
{
key: 'create',
label: 'Create',
subjects: ['Connection', 'Flow'],
},
{
key: 'read',
label: 'Read',
subjects: ['Connection', 'Execution', 'Flow'],
},
{
key: 'update',
label: 'Update',
subjects: ['Connection', 'Flow'],
},
{
key: 'delete',
label: 'Delete',
subjects: ['Connection', 'Flow'],
},
{
key: 'publish',
label: 'Publish',
subjects: ['Flow'],
},
],
conditions: [
{
key: 'isCreator',
label: 'Is creator',
},
],
subjects: [
{
key: 'Connection',
label: 'Connection',
},
{
key: 'Flow',
label: 'Flow',
},
{
key: 'Execution',
label: 'Execution',
},
],
};
return {
data: data,
meta: {
count: 1,
currentPage: null,
isArray: false,
totalPages: null,
type: 'Object',
},
};
};
export default getPermissionsCatalogMock;