diff --git a/packages/client/hmi-client/src/components/home/tera-project-menu.vue b/packages/client/hmi-client/src/components/home/tera-project-menu.vue index abfe729195..efd5ac532a 100644 --- a/packages/client/hmi-client/src/components/home/tera-project-menu.vue +++ b/packages/client/hmi-client/src/components/home/tera-project-menu.vue @@ -82,7 +82,7 @@ const downloadMenuItem = { }; const projectMenuItems = computed(() => { - // Basic access to public and reader project + // Basic access to a public and reader project const items: MenuItem[] = [copyMenuItem, downloadMenuItem]; // Creator/Editor of the project diff --git a/packages/client/hmi-client/src/components/widgets/share-project/tera-share-project.vue b/packages/client/hmi-client/src/components/widgets/share-project/tera-share-project.vue index 91ce7ed840..c5abdaf889 100644 --- a/packages/client/hmi-client/src/components/widgets/share-project/tera-share-project.vue +++ b/packages/client/hmi-client/src/components/widgets/share-project/tera-share-project.vue @@ -8,7 +8,7 @@ @after-hide="onAfterHide" :style="{ width: '35rem' }" > -
+
diff --git a/packages/client/hmi-client/src/composables/project.ts b/packages/client/hmi-client/src/composables/project.ts index 80a9a92dee..1f7cdde1cd 100644 --- a/packages/client/hmi-client/src/composables/project.ts +++ b/packages/client/hmi-client/src/composables/project.ts @@ -149,22 +149,16 @@ export function useProjects() { } /** - * Update a project. If updated project is the active project, refresh it. - * - * @param {Project} project Project to update. - * @returns {Promise} Id of the updated project. + * Update a project. If the updated project is the active project, refresh it. */ async function update(project: Project) { - const updated = await ProjectService.update(project); + await ProjectService.update(project); if (project.id === activeProjectId.value) { setTimeout(async () => { activeProject.value = await ProjectService.get(project.id); }, 1000); } - setTimeout(async () => { - getAll(); - }, TIMEOUT_MS); - return updated; + setTimeout(getAll, TIMEOUT_MS); } /** diff --git a/packages/client/hmi-client/src/services/project.ts b/packages/client/hmi-client/src/services/project.ts index 29a2b7f316..0daf3e63eb 100644 --- a/packages/client/hmi-client/src/services/project.ts +++ b/packages/client/hmi-client/src/services/project.ts @@ -13,6 +13,7 @@ import type { Component, Ref } from 'vue'; * Create a project * @param name Project['name'] * @param [description] Project['description'] + * @param thumbnail * @return Project|null - the appropriate project, or null if none returned by API */ async function create( diff --git a/packages/client/hmi-client/src/types/Types.ts b/packages/client/hmi-client/src/types/Types.ts index cdec7edce9..2a35c01f60 100644 --- a/packages/client/hmi-client/src/types/Types.ts +++ b/packages/client/hmi-client/src/types/Types.ts @@ -801,9 +801,9 @@ export interface ModelUnit { } export interface GroundedSemantic { - grounding?: ModelGrounding; id: string; name?: string; + grounding?: ModelGrounding; } export interface Properties { diff --git a/packages/server/src/main/java/software/uncharted/terarium/hmiserver/controller/dataservice/ProjectController.java b/packages/server/src/main/java/software/uncharted/terarium/hmiserver/controller/dataservice/ProjectController.java index 41d8f13e05..022d728b55 100644 --- a/packages/server/src/main/java/software/uncharted/terarium/hmiserver/controller/dataservice/ProjectController.java +++ b/packages/server/src/main/java/software/uncharted/terarium/hmiserver/controller/dataservice/ProjectController.java @@ -1088,7 +1088,7 @@ public ResponseEntity makeProjectPublic( @PathVariable("isPublic") final boolean isPublic ) { try { - projectService.checkPermissionCanAdministrate(currentUserService.get().getId(), id); + projectService.checkPermissionCanWrite(currentUserService.get().getId(), id); // Getting the project permissions final RebacProject project = new RebacProject(id, reBACService); @@ -1148,7 +1148,7 @@ public ResponseEntity setProjectUserPermissions( @PathVariable("relationship") final String relationship ) { try { - projectService.checkPermissionCanAdministrate(currentUserService.get().getId(), projectId); + projectService.checkPermissionCanWrite(currentUserService.get().getId(), projectId); final RebacProject what = new RebacProject(projectId, reBACService); final RebacUser who = new RebacUser(userId, reBACService);