feat: add secure view share role

Adds a new share role "Secure View". This role is applicable for files, folders and spaces and only allows viewing them (and their content).
This commit is contained in:
Jannik Stehle
2024-04-29 09:42:31 +02:00
parent aa26c451f7
commit 1aeb30193a
5 changed files with 282 additions and 35 deletions
@@ -48,8 +48,8 @@ Feature: List a sharing permissions
},
"@libre.graph.permissions.roles.allowedValues": {
"type": "array",
"minItems": 3,
"maxItems": 3,
"minItems": 4,
"maxItems": 4,
"uniqueItems": true,
"items": {
"oneOf": [
@@ -68,6 +68,41 @@ Feature: List a sharing permissions
1
]
},
"description": {
"type": "string",
"enum": [
"View only documents, images and PDFs. Watermarks will be applied."
]
},
"displayName": {
"type": "string",
"enum": [
"Can view (secure)"
]
},
"id": {
"type": "string",
"enum": [
"aa97fe03-7980-45ac-9e50-b325749fd7e6"
]
}
}
},
{
"type": "object",
"required": [
"@libre.graph.weight",
"description",
"displayName",
"id"
],
"properties": {
"@libre.graph.weight": {
"type": "integer",
"enum": [
2
]
},
"description": {
"type": "string",
"enum": [
@@ -100,7 +135,7 @@ Feature: List a sharing permissions
"@libre.graph.weight": {
"type": "integer",
"enum": [
2
3
]
},
"description": {
@@ -135,7 +170,7 @@ Feature: List a sharing permissions
"@libre.graph.weight": {
"type": "integer",
"enum": [
3
4
]
},
"description": {
@@ -207,8 +242,8 @@ Feature: List a sharing permissions
},
"@libre.graph.permissions.roles.allowedValues": {
"type": "array",
"minItems": 3,
"maxItems": 3,
"minItems": 4,
"maxItems": 4,
"uniqueItems": true,
"items": {
"oneOf": [
@@ -224,6 +259,29 @@ Feature: List a sharing permissions
"@libre.graph.weight": {
"const": 1
},
"description": {
"const": "View only documents, images and PDFs. Watermarks will be applied."
},
"displayName": {
"const": "Can view (secure)"
},
"id": {
"const": "aa97fe03-7980-45ac-9e50-b325749fd7e6"
}
}
},
{
"type": "object",
"required": [
"@libre.graph.weight",
"description",
"displayName",
"id"
],
"properties": {
"@libre.graph.weight": {
"const": 2
},
"description": {
"const": "View and download."
},
@@ -245,7 +303,7 @@ Feature: List a sharing permissions
],
"properties": {
"@libre.graph.weight": {
"const": 2
"const": 3
},
"description": {
"const": "View, download, upload, edit, add and delete."
@@ -268,7 +326,7 @@ Feature: List a sharing permissions
],
"properties": {
"@libre.graph.weight": {
"const": 3
"const": 4
},
"description": {
"const": "View, download, upload, edit, add, delete and manage members."
@@ -341,8 +399,8 @@ Feature: List a sharing permissions
},
"@libre.graph.permissions.roles.allowedValues": {
"type": "array",
"minItems": 3,
"maxItems": 3,
"minItems": 4,
"maxItems": 4,
"uniqueItems": true,
"items": {
"oneOf": [
@@ -358,6 +416,29 @@ Feature: List a sharing permissions
"@libre.graph.weight": {
"const": 1
},
"description": {
"const": "View only documents, images and PDFs. Watermarks will be applied."
},
"displayName": {
"const": "Can view (secure)"
},
"id": {
"const": "aa97fe03-7980-45ac-9e50-b325749fd7e6"
}
}
},
{
"type": "object",
"required": [
"@libre.graph.weight",
"description",
"displayName",
"id"
],
"properties": {
"@libre.graph.weight": {
"const": 2
},
"description": {
"const": "View and download."
},
@@ -379,7 +460,7 @@ Feature: List a sharing permissions
],
"properties": {
"@libre.graph.weight": {
"const": 2
"const": 3
},
"description": {
"const": "View, download, upload, edit, add and delete."
@@ -402,7 +483,7 @@ Feature: List a sharing permissions
],
"properties": {
"@libre.graph.weight": {
"const": 3
"const": 4
},
"description": {
"const": "View, download, upload, edit, add, delete and manage members."
@@ -603,8 +684,8 @@ Feature: List a sharing permissions
},
"@libre.graph.permissions.roles.allowedValues": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"minItems": 3,
"maxItems": 3,
"uniqueItems": true,
"items": {
"oneOf":[
@@ -620,6 +701,29 @@ Feature: List a sharing permissions
"@libre.graph.weight": {
"const": 1
},
"description": {
"const": "View only documents, images and PDFs. Watermarks will be applied."
},
"displayName": {
"const": "Can view (secure)"
},
"id": {
"const": "aa97fe03-7980-45ac-9e50-b325749fd7e6"
}
}
},
{
"type": "object",
"required": [
"@libre.graph.weight",
"description",
"displayName",
"id"
],
"properties": {
"@libre.graph.weight": {
"const": 2
},
"description": {
"const": "View and download."
},
@@ -641,7 +745,7 @@ Feature: List a sharing permissions
],
"properties": {
"@libre.graph.weight": {
"const": 2
"const": 3
},
"description": {
"const": "View, download and edit."
@@ -706,11 +810,34 @@ Feature: List a sharing permissions
},
"@libre.graph.permissions.roles.allowedValues": {
"type": "array",
"minItems": 3,
"maxItems": 3,
"minItems": 4,
"maxItems": 4,
"uniqueItems": true,
"items": {
"oneOf":[
{
"type": "object",
"required": [
"@libre.graph.weight",
"description",
"displayName",
"id"
],
"properties": {
"@libre.graph.weight": {
"const": 1
},
"description": {
"const": "View only documents, images and PDFs. Watermarks will be applied."
},
"displayName": {
"const": "Can view (secure)"
},
"id": {
"const": "aa97fe03-7980-45ac-9e50-b325749fd7e6"
}
}
},
{
"type": "object",
"required": [
@@ -721,7 +848,7 @@ Feature: List a sharing permissions
],
"properties": {
"@libre.graph.weight": {
"const": 1
"const": 2
},
"description": {
"const": "View, download and upload."
@@ -744,7 +871,7 @@ Feature: List a sharing permissions
],
"properties": {
"@libre.graph.weight": {
"const": 2
"const": 3
},
"description": {
"const": "View and download."
@@ -767,7 +894,7 @@ Feature: List a sharing permissions
],
"properties": {
"@libre.graph.weight": {
"const": 3
"const": 4
},
"description": {
"const": "View, download, upload, edit, add and delete."
@@ -832,8 +959,8 @@ Feature: List a sharing permissions
},
"@libre.graph.permissions.roles.allowedValues": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"minItems": 3,
"maxItems": 3,
"uniqueItems": true,
"items": {
"oneOf":[
@@ -849,6 +976,29 @@ Feature: List a sharing permissions
"@libre.graph.weight": {
"const": 1
},
"description": {
"const": "View only documents, images and PDFs. Watermarks will be applied."
},
"displayName": {
"const": "Can view (secure)"
},
"id": {
"const": "aa97fe03-7980-45ac-9e50-b325749fd7e6"
}
}
},
{
"type": "object",
"required": [
"@libre.graph.weight",
"description",
"displayName",
"id"
],
"properties": {
"@libre.graph.weight": {
"const": 2
},
"description": {
"const": "View and download."
},
@@ -870,7 +1020,7 @@ Feature: List a sharing permissions
],
"properties": {
"@libre.graph.weight": {
"const": 2
"const": 3
},
"description": {
"const": "View, download and edit."
@@ -955,8 +1105,8 @@ Feature: List a sharing permissions
},
"@libre.graph.permissions.roles.allowedValues": {
"type": "array",
"minItems": 3,
"maxItems": 3,
"minItems": 4,
"maxItems": 4,
"uniqueItems": true,
"items": {
"oneOf": [
@@ -972,6 +1122,29 @@ Feature: List a sharing permissions
"@libre.graph.weight": {
"const": 1
},
"description": {
"const": "View only documents, images and PDFs. Watermarks will be applied."
},
"displayName": {
"const": "Can view (secure)"
},
"id": {
"const": "aa97fe03-7980-45ac-9e50-b325749fd7e6"
}
}
},
{
"type": "object",
"required": [
"@libre.graph.weight",
"description",
"displayName",
"id"
],
"properties": {
"@libre.graph.weight": {
"const": 2
},
"description": {
"const": "View and download."
},
@@ -993,7 +1166,7 @@ Feature: List a sharing permissions
],
"properties": {
"@libre.graph.weight": {
"const": 2
"const": 3
},
"description": {
"const": "View, download, upload, edit, add and delete."
@@ -1016,7 +1189,7 @@ Feature: List a sharing permissions
],
"properties": {
"@libre.graph.weight": {
"const": 3
"const": 4
},
"description": {
"const": "View, download, upload, edit, add, delete and manage members."
@@ -1186,8 +1359,8 @@ Feature: List a sharing permissions
},
"@libre.graph.permissions.roles.allowedValues": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"minItems": 2,
"maxItems": 2,
"uniqueItems": true,
"items": {
"oneOf": [
@@ -1203,6 +1376,29 @@ Feature: List a sharing permissions
"@libre.graph.weight": {
"const": 1
},
"description": {
"const": "View only documents, images and PDFs. Watermarks will be applied."
},
"displayName": {
"const": "Can view (secure)"
},
"id": {
"const": "aa97fe03-7980-45ac-9e50-b325749fd7e6"
}
}
},
{
"type": "object",
"required": [
"@libre.graph.weight",
"description",
"displayName",
"id"
],
"properties": {
"@libre.graph.weight": {
"const": 2
},
"description": {
"const": "View and download."
},