@@ -58,15 +58,6 @@ const getBucketPublicStatus = computed(() => {
5858 };
5959});
6060
61- const getInternalStatus = computed (() => {
62- return (node : BucketTreeNode ): boolean => {
63- if (node .data .bucketId ) {
64- return permissionStore .getBucketInternal (node .data .bucketId );
65- }
66- return false ;
67- };
68- });
69-
7061const emit = defineEmits ([' show-bucket-config' , ' show-sidebar-info' ]);
7162
7263// Actions
@@ -190,7 +181,11 @@ function createDummyNodes(neighbour: BucketTreeNode, node: BucketTreeNode) {
190181 return current ;
191182}
192183
193- watch (getBuckets , () => {
184+ /**
185+ * watch for changes to bucket and IDP permissions in store
186+ */
187+ // eslint-disable-next-line no-empty-pattern
188+ watch ([getBuckets , permissionStore .getBucketIdpPermissions ], ([]) => {
194189 // Make sure everything is clear for a rebuild...
195190 endpointMap .clear ();
196191 bucketTreeNodeMap .clear ();
@@ -328,11 +323,12 @@ watch(getBuckets, () => {
328323 </template >
329324 </Column >
330325 <Column
331- header =" Actions"
326+ field =" publicSharing"
327+ header =" Sharing"
332328 header-class =" text-right"
333- body-class =" action-buttons"
334- header-style =" width: 320px"
329+ style =" text-align : right ; width : 300px "
335330 >
331+ >
336332 <template #body =" { node } " >
337333 <span v-if =" !node.data.dummy" >
338334 <Tag
@@ -346,65 +342,73 @@ watch(getBuckets, () => {
346342 icon =" pi pi-info-circle"
347343 class =" public-folder"
348344 />
349-
350345 <Tag
351- v-if =" !getBucketPublicStatus(node) && getInternalStatus (node)"
346+ v-if =" !getBucketPublicStatus(node) && permissionStore.getBucketInternal (node.data.bucketId )"
352347 v-tooltip =" 'Contents of this Folder can be read by anyone internal to government.'"
353- value =" Internal"
348+ value =" Internal (IDIR) "
354349 severity =" info"
355350 rounded
356351 icon =" pi pi-info-circle"
357- class =" ml-2 mb-1 min-w-100"
352+ class =" mb-1 min-w-100"
358353 />
359-
360- <BucketChildConfig
361- v-if =" permissionStore.isBucketActionAllowed(node.data.bucketId, getUserId, Permissions.CREATE)"
362- :parent-bucket =" node.data"
363- />
364- <Button
365- v-if =" permissionStore.isBucketActionAllowed(node.data.bucketId, getUserId, Permissions.MANAGE)"
366- id =" folder_permissions"
367- v-tooltip.bottom =" 'Folder permissions'"
368- class =" p-button-lg p-button-text"
369- aria-label =" Folder permissions"
370- @click =" showPermissions(node.data.bucketId, node.data.bucketName)"
371- >
372- <span class =" material-icons-outlined" >supervisor_account</span >
373- </Button >
374- <ShareButton
375- :bucket-id =" node.data.bucketId"
376- label-text =" Folder"
377- />
378- <Button
379- v-if =" permissionStore.isBucketActionAllowed(node.data.bucketId, getUserId, Permissions.MANAGE)"
380- v-tooltip.bottom =" 'Configure folder'"
381- class =" p-button-lg p-button-text"
382- aria-label =" Configure folder"
383- @click =" showBucketConfig({ ...node.data, isRoot: node.isRoot })"
384- >
385- <span class =" material-icons-outlined" >settings</span >
386- </Button >
387- <Button
388- v-if =" permissionStore.isBucketActionAllowed(node.data.bucketId, getUserId, Permissions.READ)"
389- v-tooltip.bottom =" 'Folder details'"
390- class =" p-button-lg p-button-rounded p-button-text"
391- aria-label =" Folder details"
392- @click =" showSidebarInfo(node.data.bucketId)"
393- >
394- <span class =" material-icons-outlined" >info</span >
395- </Button >
396- <Button
397- v-if =" permissionStore.isBucketActionAllowed(node.data.bucketId, getUserId, Permissions.DELETE)"
398- v-tooltip.bottom =" 'Delete folder'"
399- class =" p-button-lg p-button-text p-button-danger"
400- aria-label =" Delete folder"
401- @click =" confirmDeleteBucket(node.data.bucketId)"
402- >
403- <span class =" material-icons-outlined" >delete</span >
404- </Button >
405354 </span >
406355 </template >
407356 </Column >
357+
358+ <Column
359+ header =" Actions"
360+ header-class =" text-right"
361+ body-class =" action-buttons"
362+ header-style =" width: 20px"
363+ >
364+ <template #body =" { node } " >
365+ <BucketChildConfig
366+ v-if =" permissionStore.isBucketActionAllowed(node.data.bucketId, getUserId, Permissions.CREATE)"
367+ :parent-bucket =" node.data"
368+ />
369+ <Button
370+ v-if =" permissionStore.isBucketActionAllowed(node.data.bucketId, getUserId, Permissions.MANAGE)"
371+ id =" folder_permissions"
372+ v-tooltip.bottom =" 'Folder permissions'"
373+ class =" p-button-lg p-button-text"
374+ aria-label =" Folder permissions"
375+ @click =" showPermissions(node.data.bucketId, node.data.bucketName)"
376+ >
377+ <span class =" material-icons-outlined" >supervisor_account</span >
378+ </Button >
379+ <ShareButton
380+ :bucket-id =" node.data.bucketId"
381+ label-text =" Folder"
382+ />
383+ <Button
384+ v-if =" permissionStore.isBucketActionAllowed(node.data.bucketId, getUserId, Permissions.MANAGE)"
385+ v-tooltip.bottom =" 'Configure folder'"
386+ class =" p-button-lg p-button-text"
387+ aria-label =" Configure folder"
388+ @click =" showBucketConfig({ ...node.data, isRoot: node.isRoot })"
389+ >
390+ <span class =" material-icons-outlined" >settings</span >
391+ </Button >
392+ <Button
393+ v-if =" permissionStore.isBucketActionAllowed(node.data.bucketId, getUserId, Permissions.READ)"
394+ v-tooltip.bottom =" 'Folder details'"
395+ class =" p-button-lg p-button-rounded p-button-text"
396+ aria-label =" Folder details"
397+ @click =" showSidebarInfo(node.data.bucketId)"
398+ >
399+ <span class =" material-icons-outlined" >info</span >
400+ </Button >
401+ <Button
402+ v-if =" permissionStore.isBucketActionAllowed(node.data.bucketId, getUserId, Permissions.DELETE)"
403+ v-tooltip.bottom =" 'Delete folder'"
404+ class =" p-button-lg p-button-text p-button-danger"
405+ aria-label =" Delete folder"
406+ @click =" confirmDeleteBucket(node.data.bucketId)"
407+ >
408+ <span class =" material-icons-outlined" >delete</span >
409+ </Button >
410+ </template >
411+ </Column >
408412 </TreeTable >
409413
410414 <!-- eslint-disable vue/no-v-model-argument -->
0 commit comments