diff --git a/src/components/Permissions/Permissions.vue b/src/components/Permissions/Permissions.vue
index 876fb30..b84365a 100644
--- a/src/components/Permissions/Permissions.vue
+++ b/src/components/Permissions/Permissions.vue
@@ -15,13 +15,13 @@ const permissionGroups = computed(() => {
return [
{
field: "managersAclPermission",
- label: "Resourcenadministrator*innen",
+ label: "Manager*innen",
value: props.resource.managersAclPermission,
mask: 31,
},
{
field: "membersAclPermission",
- label: "Resourcenmitglieder",
+ label: "Mitglieder",
value: props.resource.membersAclPermission,
mask: 31,
},
diff --git a/src/views/ResourceSettings.vue b/src/views/ResourceSettings.vue
index c62405f..1756d31 100644
--- a/src/views/ResourceSettings.vue
+++ b/src/views/ResourceSettings.vue
@@ -34,11 +34,11 @@ const resourceNameValid = computed(() => {
});
const saveName = async () => {
- resource.value = await api.updateResource(resource.value.id, { name: currentResourceName.value }, "model+members");
+ resource.value = await api.updateResource(resource.value.id, { name: currentResourceName.value }, "model+members+subresources");
};
const saveInheritManagers = async (inheritManagers) => {
- resource.value = await api.updateResource(resource.value.id, { inheritManagers }, "model+members");
+ resource.value = await api.updateResource(resource.value.id, { inheritManagers }, "model+members+subresources");
};
watch(() => props.resourceId, async (newResourceId) => {
@@ -50,16 +50,22 @@ watch(() => props.resourceId, async (newResourceId) => {
const saveActive = async (active) => {
resourceActiveLoading.value = true;
- resource.value = await api.updateResource(resource.value.id, { active }, "model+members");
+ resource.value = await api.updateResource(resource.value.id, { active }, "model+members+subresources");
resourceActiveLoading.value = false;
};
const savePermission = async ({ field, value }) => {
resource.value = await api.updateResource(resource.value.id, {
[field]: value,
- }, "model+members");
+ }, "model+members+subresources");
};
+const deleteResource = async (closeDialog) => {
+ await api.deleteResource(resource.value.id);
+ closeDialog();
+ backButtonClicked();
+}
+
const switchToSnapshotRestoreView = () => {
};
@@ -111,6 +117,21 @@ const backButtonClicked = () => {
};
+const createSubResource = async (type, name) => {
+ resource.value.subResources.push(await api.createResource({
+ type,
+ organizationFolderId: resource.value.organizationFolderId,
+ name,
+ parentResourceId: resource.value.id,
+ active: true,
+ inheritManagers: true,
+
+ membersAclPermission: 0,
+ managersAclPermission: 31,
+ inheritedAclPermission: 1,
+ }));
+}
+
@@ -118,7 +139,7 @@ const backButtonClicked = () => {
:has-back-button="true"
:has-next-step-button="false"
:has-last-step-button="false"
- :title="'Resource Settings'"
+ :title="resource?.type === api.ResourceTypes.FOLDER ? 'Folder Settings' : 'Settings'"
:loading="loading"
v-slot=""
@back-button-pressed="backButtonClicked">
@@ -136,7 +157,7 @@ const backButtonClicked = () => {
@trailing-button-click="saveName"
@blur="() => currentResourceName = currentResourceName.trim()"
@keyup.enter="saveName" />
- Berechtigungen