Initial QSfera import

This commit is contained in:
Курнат Андрей
2026-06-07 10:20:04 +03:00
commit 2315f25754
16485 changed files with 4826827 additions and 0 deletions
@@ -0,0 +1,477 @@
@env-config
Feature: enable disable permissions role
As a user
I want to enable/disable permissions role on shared resources
So that I can control the accessibility of shared resources to sharee
Background:
Given these users have been created with default attributes:
| username |
| Alice |
| Brian |
Scenario Outline: users list the shares shared with Secure Viewer after the role is disabled (Personal Space)
Given the administrator has enabled the permissions role "Secure Viewer"
And user "Alice" has uploaded file with content "some content" to "textfile.txt"
And user "Alice" has created folder "folderToShare"
And user "Alice" has uploaded file with content "hello world" to "folderToShare/textfile1.txt"
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Secure Viewer |
And user "Brian" has a share "<resource>" synced
And the administrator has disabled the permissions role "Secure Viewer"
When user "Alice" lists the shares shared by her using the Graph API
Then the HTTP status code should be "200"
And the JSON data of the response should contain resource "<resource>" with the following data:
"""
{
"type": "object",
"required": [
"parentReference",
"permissions",
"name"
],
"properties": {
"permissions": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "object",
"required": [
"@libre.graph.permissions.actions",
"grantedToV2",
"id",
"invitation"
],
"properties": {
"@libre.graph.permissions.actions": {
"const": [
"libre.graph/driveItem/path/read",
"libre.graph/driveItem/children/read",
"libre.graph/driveItem/basic/read"
]
},
"roles": { "const": null }
}
}
}
}
}
"""
When user "Brian" lists the shares shared with him using the Graph API
Then the HTTP status code should be "200"
And the JSON data of the response should match
"""
{
"type": "object",
"required": ["value"],
"properties": {
"value": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "object",
"required": [
"@UI.Hidden",
"@client.synchronize",
"createdBy",
"eTag",
"<resource-type>",
"id",
"lastModifiedDateTime",
"name",
"parentReference",
"remoteItem"
],
"properties": {
"remoteItem": {
"type": "object",
"required": [
"createdBy",
"eTag",
"<resource-type>",
"id",
"lastModifiedDateTime",
"name",
"parentReference",
"permissions"
],
"properties": {
"name": { "const": "<resource>" },
"permissions": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "object",
"required": [
"@libre.graph.permissions.actions",
"grantedToV2",
"id",
"invitation"
],
"properties": {
"@libre.graph.permissions.actions": {
"const": [
"libre.graph/driveItem/path/read",
"libre.graph/driveItem/children/read",
"libre.graph/driveItem/basic/read"
]
},
"roles": { "const": null }
}
}
}
}
}
}
}
}
}
}
"""
And user "Brian" should have a share "<resource>" shared by user "Alice" from space "Personal"
When user "Brian" sends PROPFIND request from the space "Shares" to the resource "<resource>" with depth "0" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" the PROPFIND response should contain a resource "<resource>" with these key and value pairs:
| key | value |
| oc:name | <resource> |
| oc:permissions | SX |
And user "Brian" should not be able to download file "<resource-to-download>" from space "Shares"
Examples:
| resource | resource-type | resource-to-download |
| textfile.txt | file | textfile.txt |
| folderToShare | folder | folderToShare/textfile1.txt |
Scenario: users list the shares shared with Denied after the role is disabled (Personal Space)
Given the administrator has enabled the permissions role "Denied"
And user "Alice" has created folder "folderToShare"
And user "Alice" has uploaded file with content "hello world" to "folderToShare/textfile1.txt"
And user "Alice" has sent the following resource share invitation:
| resource | folderToShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Denied |
And the administrator has disabled the permissions role "Denied"
When user "Alice" lists the shares shared by her using the Graph API
Then the HTTP status code should be "200"
And the JSON data of the response should contain resource "folderToShare" with the following data:
"""
{
"type": "object",
"required": [
"parentReference",
"permissions",
"name"
],
"properties": {
"permissions": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "object",
"required": [
"@libre.graph.permissions.actions",
"grantedToV2",
"id",
"invitation"
],
"properties": {
"@libre.graph.permissions.actions": {
"const": ["none"]
},
"roles": { "const": null }
}
}
}
}
}
"""
When user "Brian" lists the shares shared with him using the Graph API
Then the HTTP status code should be "200"
And the JSON data of the response should match
"""
{
"type": "object",
"required": ["value"],
"properties": {
"value": {
"type": "array",
"minItems": 0,
"maxItems": 0
}
}
}
"""
And user "Brian" should not have a share "folderToShare" shared by user "Alice" from space "Personal"
When user "Brian" sends PROPFIND request from the space "Shares" to the resource "folderToShare" with depth "0" using the WebDAV API
Then the HTTP status code should be "404"
And user "Brian" should not be able to download file "folderToShare/textfile1.txt" from space "Shares"
Scenario Outline: users list the shares shared with Secure Viewer after the role is disabled (Project Space)
Given using spaces DAV path
And the administrator has enabled the permissions role "Secure Viewer"
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "textfile.txt"
And user "Alice" has created a folder "folderToShare" in space "new-space"
And user "Alice" has uploaded a file inside space "new-space" with content "hello world" to "folderToShare/textfile1.txt"
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | new-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | Secure Viewer |
And user "Brian" has a share "<resource>" synced
And the administrator has disabled the permissions role "Secure Viewer"
When user "Alice" lists the shares shared by her using the Graph API
Then the HTTP status code should be "200"
And the JSON data of the response should contain resource "<resource>" with the following data:
"""
{
"type": "object",
"required": [
"parentReference",
"permissions",
"name"
],
"properties": {
"permissions": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "object",
"required": [
"@libre.graph.permissions.actions",
"grantedToV2",
"id",
"invitation"
],
"properties": {
"@libre.graph.permissions.actions": {
"const": [
"libre.graph/driveItem/path/read",
"libre.graph/driveItem/children/read",
"libre.graph/driveItem/basic/read"
]
},
"roles": { "const": null }
}
}
}
}
}
"""
When user "Brian" lists the shares shared with him using the Graph API
Then the HTTP status code should be "200"
And the JSON data of the response should match
"""
{
"type": "object",
"required": ["value"],
"properties": {
"value": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "object",
"required": [
"@UI.Hidden",
"@client.synchronize",
"eTag",
"<resource-type>",
"id",
"lastModifiedDateTime",
"name",
"parentReference",
"remoteItem"
],
"properties": {
"remoteItem": {
"type": "object",
"required": [
"eTag",
"<resource-type>",
"id",
"lastModifiedDateTime",
"name",
"parentReference",
"permissions"
],
"properties": {
"name": { "const": "<resource>" },
"permissions": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "object",
"required": [
"@libre.graph.permissions.actions",
"grantedToV2",
"id",
"invitation"
],
"properties": {
"@libre.graph.permissions.actions": {
"const": [
"libre.graph/driveItem/path/read",
"libre.graph/driveItem/children/read",
"libre.graph/driveItem/basic/read"
]
},
"roles": { "const": null }
}
}
}
}
}
}
}
}
}
}
"""
And user "Brian" should have a share "<resource>" shared by user "Alice" from space "new-space"
When user "Brian" sends PROPFIND request from the space "Shares" to the resource "<resource>" with depth "0" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" the PROPFIND response should contain a resource "<resource>" with these key and value pairs:
| key | value |
| oc:name | <resource> |
| oc:permissions | SX |
And user "Brian" should not be able to download file "<resource-to-download>" from space "Shares"
Examples:
| resource | resource-type | resource-to-download |
| textfile.txt | file | textfile.txt |
| folderToShare | folder | folderToShare/textfile1.txt |
Scenario: users list the shares shared with Denied after the role is disabled (Project Space)
Given using spaces DAV path
And the administrator has enabled the permissions role "Denied"
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has created a folder "folderToShare" in space "new-space"
And user "Alice" has uploaded a file inside space "new-space" with content "hello world" to "folderToShare/textfile1.txt"
And user "Alice" has sent the following resource share invitation:
| resource | folderToShare |
| space | new-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | Denied |
And the administrator has disabled the permissions role "Denied"
When user "Alice" lists the shares shared by her using the Graph API
Then the HTTP status code should be "200"
And the JSON data of the response should contain resource "folderToShare" with the following data:
"""
{
"type": "object",
"required": [
"parentReference",
"permissions",
"name"
],
"properties": {
"permissions": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "object",
"required": [
"@libre.graph.permissions.actions",
"grantedToV2",
"id",
"invitation"
],
"properties": {
"@libre.graph.permissions.actions": {
"const": ["none"]
},
"roles": { "const": null }
}
}
}
}
}
"""
When user "Brian" lists the shares shared with him using the Graph API
Then the HTTP status code should be "200"
And the JSON data of the response should match
"""
{
"type": "object",
"required": ["value"],
"properties": {
"value": {
"type": "array",
"minItems": 0,
"maxItems": 0
}
}
}
"""
And user "Brian" should not have a share "folderToShare" shared by user "Alice" from space "Personal"
When user "Brian" sends PROPFIND request from the space "Shares" to the resource "folderToShare" with depth "0" using the WebDAV API
Then the HTTP status code should be "404"
And user "Brian" should not be able to download file "folderToShare/textfile1.txt" from space "Shares"
Scenario: sharee lists drives after the share role Space Editor Without Versions has been disabled
Given using spaces DAV path
And the administrator has enabled the permissions role "Space Editor Without Versions"
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "new-space" with content "hello world" to "textfile1.txt"
And user "Alice" has sent the following space share invitation:
| space | new-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | Space Editor Without Versions |
And the administrator has disabled the permissions role "Space Editor Without Versions"
When user "Brian" lists all available spaces via the Graph API
Then the HTTP status code should be "200"
And the JSON response should contain space called "new-space" and match
"""
{
"type": "object",
"required": [
"driveType",
"driveAlias",
"name",
"id",
"quota",
"root",
"webUrl"
],
"properties": {
"root": {
"type": "object",
"required": [
"eTag",
"id",
"webDavUrl"
]
}
}
}
"""
When user "Brian" sends PROPFIND request to space "new-space" with depth "0" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" the PROPFIND response should contain a space "new-space" with these key and value pairs:
| key | value |
| oc:name | new-space |
| oc:permissions | DNVCK |
And user "Brian" should be able to download file "textfile1.txt" from space "new-space"
@@ -0,0 +1,968 @@
Feature: enable or disable sync of incoming shares
As a user
I want to have control over the share received
So that I can filter out the files and folder shared with Me
Background:
Given these users have been created with default attributes:
| username |
| Alice |
| Brian |
And using spaces DAV path
Scenario Outline: disable sync of shared resource
Given user "Alice" has created folder "FolderToShare"
And user "Alice" has uploaded file with content "hello world" to "/textfile0.txt"
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "<resource>" synced
When user "Brian" disables sync of share "<resource>" using the Graph API
Then the HTTP status code should be "204"
When user "Brian" lists the shares shared with him using the Graph API
Then the HTTP status code should be "200"
And the JSON data of the response should match
"""
{
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "object",
"required": [
"@client.synchronize"
],
"properties": {
"@client.synchronize": {
"const": false
}
}
}
}
}
}
"""
Examples:
| resource |
| textfile0.txt |
| FolderToShare |
Scenario Outline: enable sync of shared resource when auto-sync is disabled
Given user "Brian" has disabled the auto-sync share
And user "Alice" has uploaded file with content "hello world" to "/textfile0.txt"
And user "Alice" has created folder "folder"
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
When user "Brian" enables sync of share "<resource>" offered by "Alice" from "Personal" space using the Graph API
Then the HTTP status code should be "201"
And the JSON data of the response should match
"""
{
"type": "object",
"required": [
"@client.synchronize"
],
"properties": {
"@client.synchronize": {
"const": true
}
}
}
"""
Examples:
| resource |
| textfile0.txt |
| folder |
Scenario Outline: enable a group share sync by only one user in a group
Given user "Carol" has been created with default attributes
And group "grp1" has been created
And user "Alice" has been added to group "grp1"
And user "Brian" has been added to group "grp1"
And user "Alice" has disabled the auto-sync share
And user "Brian" has disabled the auto-sync share
And user "Carol" has uploaded file with content "hello world" to "/textfile0.txt"
And user "Carol" has created folder "FolderToShare"
And user "Carol" has sent the following resource share invitation:
| resource | <resource> |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
When user "Alice" enables sync of share "<resource>" offered by "Carol" from "Personal" space using the Graph API
Then the HTTP status code should be "201"
And the JSON data of the response should match
"""
{
"type": "object",
"required": [
"@client.synchronize"
],
"properties": {
"@client.synchronize": {
"const": true
}
}
}
"""
And user "Alice" should have sync enabled for share "<resource>"
And user "Brian" should have sync disabled for share "<resource>"
Examples:
| resource |
| textfile0.txt |
| FolderToShare |
Scenario Outline: disable group share sync by only one user in a group
Given user "Carol" has been created with default attributes
And group "grp1" has been created
And user "Alice" has been added to group "grp1"
And user "Brian" has been added to group "grp1"
And user "Carol" has created folder "FolderToShare"
And user "Carol" has uploaded file with content "hello world" to "/textfile0.txt"
And user "Carol" has sent the following resource share invitation:
| resource | <resource> |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
And user "Alice" has a share "<resource>" synced
When user "Alice" disables sync of share "<resource>" using the Graph API
Then the HTTP status code should be "204"
And user "Alice" should have sync disabled for share "<resource>"
And user "Brian" should have sync enabled for share "<resource>"
Examples:
| resource |
| textfile0.txt |
| FolderToShare |
Scenario Outline: enable sync of shared resource from project space
Given user "Brian" has disabled the auto-sync share
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And user "Alice" has created a folder "FolderToShare" in space "NewSpace"
And user "Alice" has uploaded a file inside space "NewSpace" with content "hello world" to "/textfile0.txt"
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | NewSpace |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
When user "Brian" enables sync of share "<resource>" offered by "Alice" from "NewSpace" space using the Graph API
Then the HTTP status code should be "201"
And the JSON data of the response should match
"""
{
"type": "object",
"required": [
"@client.synchronize"
],
"properties": {
"@client.synchronize": {
"const": true
}
}
}
"""
Examples:
| resource |
| textfile0.txt |
| FolderToShare |
Scenario Outline: disable sync of shared resource from project space
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And user "Alice" has created a folder "FolderToShare" in space "NewSpace"
And user "Alice" has uploaded a file inside space "NewSpace" with content "hello world" to "/textfile0.txt"
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | NewSpace |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "<resource>" synced
When user "Brian" disables sync of share "<resource>" using the Graph API
Then the HTTP status code should be "204"
When user "Brian" lists the shares shared with him using the Graph API
Then the HTTP status code should be "200"
And the JSON data of the response should match
"""
{
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "object",
"required": [
"@client.synchronize"
],
"properties": {
"@client.synchronize": {
"const": false
}
}
}
}
}
}
"""
Examples:
| resource |
| textfile0.txt |
| FolderToShare |
Scenario Outline: enable a group share sync shared from Project Space by only one user in a group
Given user "Carol" has been created with default attributes
And the administrator has assigned the role "Space Admin" to user "Carol" using the Graph API
And group "grp1" has been created
And user "Alice" has been added to group "grp1"
And user "Brian" has been added to group "grp1"
And user "Alice" has disabled the auto-sync share
And user "Brian" has disabled the auto-sync share
And user "Carol" has created a space "NewSpace" with the default quota using the Graph API
And user "Carol" has created a folder "FolderToShare" in space "NewSpace"
And user "Carol" has uploaded a file inside space "NewSpace" with content "hello world" to "/textfile0.txt"
And user "Carol" has sent the following resource share invitation:
| resource | <resource> |
| space | NewSpace |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
When user "Alice" enables sync of share "<resource>" offered by "Carol" from "NewSpace" space using the Graph API
Then the HTTP status code should be "201"
And the JSON data of the response should match
"""
{
"type": "object",
"required": [
"@client.synchronize"
],
"properties": {
"@client.synchronize": {
"const": true
}
}
}
"""
And user "Alice" should have sync enabled for share "<resource>"
And user "Brian" should have sync disabled for share "<resource>"
Examples:
| resource |
| textfile0.txt |
| FolderToShare |
Scenario Outline: disable group share sync shared from Project space by only one user in a group
Given user "Carol" has been created with default attributes
And the administrator has assigned the role "Space Admin" to user "Carol" using the Graph API
And group "grp1" has been created
And user "Alice" has been added to group "grp1"
And user "Brian" has been added to group "grp1"
And user "Carol" has created a space "NewSpace" with the default quota using the Graph API
And user "Carol" has created a folder "FolderToShare" in space "NewSpace"
And user "Carol" has uploaded a file inside space "NewSpace" with content "hello world" to "/textfile0.txt"
And user "Carol" has sent the following resource share invitation:
| resource | <resource> |
| space | NewSpace |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
And user "Alice" has a share "<resource>" synced
When user "Alice" disables sync of share "<resource>" using the Graph API
Then the HTTP status code should be "204"
And user "Alice" should have sync disabled for share "<resource>"
And user "Brian" should have sync enabled for share "<resource>"
Examples:
| resource |
| textfile0.txt |
| FolderToShare |
Scenario: try to enable share sync of a non-existent resource
Given user "Brian" has disabled the auto-sync share
When user "Brian" tries to enable share sync of a resource "nonexistent" using the Graph API
Then the HTTP status code should be "404"
And the JSON data of the response should match
"""
{
"type": "object",
"required": ["error"],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"innererror",
"message"
],
"properties": {
"code" : {
"const": "itemNotFound"
},
"innererror" : {
"type": "object",
"required": [
"date",
"request-id"
]
},
"message" : {
"const": "no shares found"
}
}
}
}
}
"""
Scenario: try to enable share sync with empty resource id
Given user "Brian" has disabled the auto-sync share
When user "Brian" tries to enable share sync of a resource "" using the Graph API
Then the HTTP status code should be "400"
And the JSON data of the response should match
"""
{
"type": "object",
"required": ["error"],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"innererror",
"message"
],
"properties": {
"code" : {
"const": "invalidRequest"
},
"innererror" : {
"type": "object",
"required": [
"date",
"request-id"
]
},
"message" : {
"const": "invalid id"
}
}
}
}
}
"""
Scenario: try to enable share sync with not shared resource id
Given user "Brian" has disabled the auto-sync share
And user "Alice" has uploaded file with content "some data" to "/fileNotShared.txt"
And we save it into "FILEID"
When user "Brian" tries to enable share sync of a resource "<<FILEID>>" using the Graph API
Then the HTTP status code should be "404"
And the JSON data of the response should match
"""
{
"type": "object",
"required": ["error"],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"innererror",
"message"
],
"properties": {
"code" : {
"const": "itemNotFound"
},
"innererror" : {
"type": "object",
"required": [
"date",
"request-id"
]
},
"message" : {
"const": "no shares found"
}
}
}
}
}
"""
Scenario: try to enable sync of shared resource from Personal Space when sharer is deleted
Given user "Brian" has disabled the auto-sync share
And user "Alice" has uploaded file with content "hello world" to "/textfile0.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | textfile0.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And the user "Admin" has deleted a user "Alice"
When user "Brian" tries to enable share sync of a resource "<<FILEID>>" using the Graph API
Then the HTTP status code should be "400"
And the JSON data of the response should match
"""
{
"type": "object",
"required": ["error"],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"innererror",
"message"
],
"properties": {
"code" : {
"const": "invalidRequest"
},
"innererror" : {
"type": "object",
"required": [
"date",
"request-id"
]
},
"message" : {
"const": "converting to drive items failed"
}
}
}
}
}
"""
Scenario: try to disable sync of shared resource from Personal Space when sharer is deleted
Given user "Brian" has disabled the auto-sync share
And user "Alice" has uploaded file with content "hello world" to "/textfile0.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | textfile0.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And the user "Admin" has deleted a user "Alice"
When user "Brian" tries to disable sync of share "textfile0.txt" using the Graph API
Then the HTTP status code should be "404"
And the JSON data of the response should match
"""
{
"type": "object",
"required": ["error"],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"innererror",
"message"
],
"properties": {
"code" : {
"const": "itemNotFound"
},
"innererror" : {
"type": "object",
"required": [
"date",
"request-id"
]
},
"message" : {
"const": "no shares found"
}
}
}
}
}
"""
Scenario: enable sync of shared resource from Project Space when sharer is deleted
Given user "Brian" has disabled the auto-sync share
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "NewSpace" with content "hello world" to "/textfile0.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | textfile0.txt |
| space | NewSpace |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And the user "Admin" has deleted a user "Alice"
When user "Brian" enables share sync of a resource "<<FILEID>>" using the Graph API
Then the HTTP status code should be "201"
And user "Brian" should have sync enabled for share "textfile0.txt"
Scenario: disable sync of shared resource from Project Space when sharer is deleted
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "NewSpace" with content "hello world" to "/textfile0.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | textfile0.txt |
| space | NewSpace |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "textfile0.txt" synced
And the user "Admin" has deleted a user "Alice"
When user "Brian" disables sync of share "textfile0.txt" using the Graph API
Then the HTTP status code should be "204"
And user "Brian" should have sync disabled for share "textfile0.txt"
Scenario: try to enable sync of group shared resource when sharer is deleted
Given user "Brian" has disabled the auto-sync share
And group "grp1" has been created
And user "Alice" has been added to group "grp1"
And user "Brian" has been added to group "grp1"
And user "Alice" has uploaded file with content "hello world" to "/textfile0.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | textfile0.txt |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
And group "grp1" has been deleted
When user "Brian" tries to enable share sync of a resource "<<FILEID>>" using the Graph API
Then the HTTP status code should be "404"
And the JSON data of the response should match
"""
{
"type": "object",
"required": ["error"],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"innererror",
"message"
],
"properties": {
"code" : {
"const": "itemNotFound"
},
"innererror" : {
"type": "object",
"required": [
"date",
"request-id"
]
},
"message" : {
"const": "no shares found"
}
}
}
}
}
"""
Scenario: try to disable sync of group shared resource when sharer is deleted
Given user "Brian" has disabled the auto-sync share
And group "grp1" has been created
And user "Alice" has been added to group "grp1"
And user "Brian" has been added to group "grp1"
And user "Alice" has uploaded file with content "hello world" to "/textfile0.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | textfile0.txt |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
And group "grp1" has been deleted
When user "Brian" tries to disable sync of share "textfile0.txt" using the Graph API
Then the HTTP status code should be "404"
And the JSON data of the response should match
"""
{
"type": "object",
"required": ["error"],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"innererror",
"message"
],
"properties": {
"code" : {
"const": "itemNotFound"
},
"innererror" : {
"type": "object",
"required": [
"date",
"request-id"
]
},
"message" : {
"const": "error getting received share"
}
}
}
}
}
"""
@issue-9001
Scenario: try to disable share sync of a non-existent resource
When user "Brian" tries to disable share sync of a resource "nonexistent" using the Graph API
Then the HTTP status code should be "404"
And the JSON data of the response should match
"""
{
"type": "object",
"required": ["error"],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"innererror",
"message"
],
"properties": {
"code" : {
"const": "itemNotFound"
},
"innererror" : {
"type": "object",
"required": [
"date",
"request-id"
]
},
"message" : {
"const": "error getting received share"
}
}
}
}
}
"""
Scenario: try to disable share sync with empty resource id
When user "Brian" tries to disable share sync of a resource "" using the Graph API
Then the HTTP status code should be "400"
And the JSON data of the response should match
"""
{
"type": "object",
"required": ["error"],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"innererror",
"message"
],
"properties": {
"code" : {
"const": "invalidRequest"
},
"innererror" : {
"type": "object",
"required": [
"date",
"request-id"
]
},
"message" : {
"const": "invalid driveID or itemID"
}
}
}
}
}
"""
Scenario: try to disable share sync with not shared resource id
Given user "Alice" has uploaded file with content "some data" to "/fileNotShared.txt"
And we save it into "FILEID"
When user "Brian" tries to disable share sync of a resource "<<FILEID>>" using the Graph API
Then the HTTP status code should be "404"
And the JSON data of the response should match
"""
{
"type": "object",
"required": ["error"],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"innererror",
"message"
],
"properties": {
"code" : {
"const": "itemNotFound"
},
"innererror" : {
"type": "object",
"required": [
"date",
"request-id"
]
},
"message" : {
"const": "error getting received share"
}
}
}
}
}
"""
@issue-8876
Scenario Outline: try to enable sync of already synced share
Given user "Alice" has uploaded file with content "hello world" to "/textfile0.txt"
And user "Alice" has created folder "folder"
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "<resource>" synced
When user "Brian" enables sync of share "<resource>" offered by "Alice" from "Personal" space using the Graph API
Then the HTTP status code should be "409"
And the JSON data of the response should match
"""
{
"type": "object",
"required": ["error"],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"innererror",
"message"
],
"properties": {
"code" : {
"const": "nameAlreadyExists"
},
"innererror" : {
"type": "object",
"required": [
"date",
"request-id"
]
},
"message" : {
"const": "shares already mounted"
}
}
}
}
}
"""
Examples:
| resource |
| textfile0.txt |
| folder |
@issue-8876
Scenario Outline: try to disable sync of already unsynced share
Given user "Alice" has uploaded file with content "hello world" to "/textfile0.txt"
And user "Alice" has created folder "folder"
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "<resource>" synced
And user "Brian" has disabled sync of last shared resource
When user "Brian" disables sync of share "<resource>" using the Graph API
Then the HTTP status code should be "409"
And the JSON data of the response should match
"""
{
"type": "object",
"required": ["error"],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"innererror",
"message"
],
"properties": {
"code" : {
"const": "nameAlreadyExists"
},
"innererror" : {
"type": "object",
"required": [
"date",
"request-id"
]
},
"message" : {
"const": "shares already unmounted"
}
}
}
}
}
"""
Examples:
| resource |
| textfile0.txt |
| folder |
@issue-8876
Scenario Outline: try to enable sync of already synced share shared from Project space
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And user "Alice" has created a folder "FolderToShare" in space "NewSpace"
And user "Alice" has uploaded a file inside space "NewSpace" with content "hello world" to "/textfile0.txt"
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | NewSpace |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "<resource>" synced
When user "Brian" enables sync of share "<resource>" offered by "Alice" from "NewSpace" space using the Graph API
Then the HTTP status code should be "409"
And the JSON data of the response should match
"""
{
"type": "object",
"required": ["error"],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"innererror",
"message"
],
"properties": {
"code" : {
"const": "nameAlreadyExists"
},
"innererror" : {
"type": "object",
"required": [
"date",
"request-id"
]
},
"message" : {
"const": "shares already mounted"
}
}
}
}
}
"""
Examples:
| resource |
| textfile0.txt |
| FolderToShare |
@issue-8876
Scenario Outline: try to disable sync of already unsynced share shared from Project space
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And user "Alice" has created a folder "FolderToShare" in space "NewSpace"
And user "Alice" has uploaded a file inside space "NewSpace" with content "hello world" to "/textfile0.txt"
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | NewSpace |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "<resource>" synced
And user "Brian" has disabled sync of last shared resource
And user "Brian" disables sync of share "<resource>" using the Graph API
Then the HTTP status code should be "409"
And the JSON data of the response should match
"""
{
"type": "object",
"required": ["error"],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"innererror",
"message"
],
"properties": {
"code" : {
"const": "nameAlreadyExists"
},
"innererror" : {
"type": "object",
"required": [
"date",
"request-id"
]
},
"message" : {
"const": "shares already unmounted"
}
}
}
}
}
"""
Examples:
| resource |
| textfile0.txt |
| FolderToShare |
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,149 @@
Feature: propfind a shares
As a user
I want to check the PROPFIND response
So that I can make sure that the response contains all the relevant values
Background:
Given these users have been created with default attributes:
| username |
| Alice |
| Brian |
| Carol |
@issue-4421 @issue-9933
Scenario Outline: sharee PROPFIND same name shares shared by multiple users
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file with content "to share" to "textfile.txt"
And user "Alice" has created folder "folderToShare"
And user "Carol" has uploaded file with content "to share" to "textfile.txt"
And user "Carol" has created folder "folderToShare"
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "<resource>" synced
And user "Carol" has sent the following resource share invitation:
| resource | <resource> |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "<resource-2>" synced
When user "Brian" sends PROPFIND request from the space "Shares" to the resource "/" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" the PROPFIND response should contain a space "Shares" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:name | Shares |
And as user "Brian" the PROPFIND response should contain a resource "<resource>" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:name | <resource> |
| oc:permissions | S |
And as user "Brian" the PROPFIND response should contain a resource "<resource-2>" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:name | <resource-2> |
| oc:permissions | S |
Examples:
| dav-path-version | resource | resource-2 |
| old | textfile.txt | textfile (1).txt |
| old | folderToShare | folderToShare (1) |
| new | textfile.txt | textfile (1).txt |
| new | folderToShare | folderToShare (1) |
@issue-4421 @issue-9933
Scenario: sharee PROPFIND a share having bracket in the name
Given using spaces DAV path
And user "Alice" has created folder "folderToShare"
And user "Alice" has uploaded file with content "to share" to "folderToShare/textfile.txt"
And user "Carol" has created folder "folderToShare"
And user "Carol" has uploaded file with content "to share" to "folderToShare/textfile.txt"
And user "Alice" has sent the following resource share invitation:
| resource | folderToShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "folderToShare" synced
And user "Carol" has sent the following resource share invitation:
| resource | folderToShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "folderToShare (1)" synced
When user "Brian" sends PROPFIND request from the space "Shares" to the resource "folderToShare (1)" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" the PROPFIND response should contain a resource "folderToShare (1)" with these key and value pairs:
| key | value |
| oc:fileid | %share_id_pattern% |
| oc:name | folderToShare |
| oc:permissions | S |
And as user "Brian" the PROPFIND response should contain a resource "textfile.txt" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:name | textfile.txt |
| oc:permissions | |
@issue-8420
Scenario Outline: check file-id from PROPFIND with shared-with-me drive-item-id
Given using spaces DAV path
And user "Alice" has uploaded file with content "to share" to "/textfile1.txt"
And user "Alice" has created folder "folderToShare"
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "<resource>" synced
When user "Brian" sends PROPFIND request to space "Shares" with depth "1" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" the key "oc:fileid" from PROPFIND response should match with shared-with-me drive-item-id of share "<resource>"
Examples:
| resource |
| textfile1.txt |
| folderToShare |
@issue-9933
Scenario Outline: check file-id of different PROPFIND requests to shared items
Given using <dav-path-version> DAV path
And user "Alice" has created folder "folderToShare"
And user "Alice" has uploaded file with content "lorem epsum" to "folderToShare/textfile.txt"
And user "Alice" has sent the following resource share invitation:
| resource | folderToShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "folderToShare" synced
When user "Brian" sends PROPFIND request from the space "Shares" to the resource "/" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" the PROPFIND response should contain a resource "folderToShare" with these key and value pairs:
| key | value |
| oc:fileid | <pattern> |
| oc:file-parent | %self::oc:spaceid%!%uuidv4_pattern% |
When user "Brian" sends PROPFIND request from the space "Shares" to the resource "folderToShare" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" the PROPFIND response should contain a resource "folderToShare" with these key and value pairs:
| key | value |
| oc:fileid | <pattern> |
| oc:file-parent | %self::oc:spaceid%!%uuidv4_pattern% |
And as user "Brian" the PROPFIND response should contain a resource "folderToShare/textfile.txt" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:file-parent | %self::oc:spaceid%!%uuidv4_pattern% |
When user "Brian" sends PROPFIND request from the space "Shares" to the resource "folderToShare/textfile.txt" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" the PROPFIND response should contain a resource "folderToShare/textfile.txt" with these key and value pairs:
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:file-parent | %self::oc:spaceid%!%uuidv4_pattern% |
Examples:
| dav-path-version | pattern |
| old | %file_id_pattern% |
| new | %file_id_pattern% |
| spaces | %share_id_pattern% |
@@ -0,0 +1,279 @@
Feature: Remove access to a drive
https://docs.qsfera.eu/libre-graph-api/#/drives.root/DeletePermissionSpaceRoot
Background:
Given these users have been created with default attributes:
| username |
| Alice |
| Brian |
| Carol |
And using spaces DAV path
Scenario Outline: user removes user member from project space using root endpoint
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And user "Alice" has sent the following space share invitation:
| space | NewSpace |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions-role> |
When user "Alice" removes the access of user "Brian" from space "NewSpace" using root endpoint of the Graph API
Then the HTTP status code should be "204"
And the user "Brian" should not have a space called "NewSpace"
Examples:
| permissions-role |
| Space Viewer |
| Space Editor |
| Manager |
@issue-8768
Scenario Outline: user removes group from project space using root endpoint
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And group "group1" has been created
And user "Brian" has been added to group "group1"
And user "Alice" has sent the following space share invitation:
| space | NewSpace |
| sharee | group1 |
| shareType | group |
| permissionsRole | <permissions-role> |
When user "Alice" removes the access of group "group1" from space "NewSpace" using root endpoint of the Graph API
Then the HTTP status code should be "204"
And the user "Brian" should not have a space called "NewSpace"
Examples:
| permissions-role |
| Space Viewer |
| Space Editor |
| Manager |
Scenario Outline: user of a group removes another user from project space using root endpoint
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And group "group1" has been created
And user "Brian" has been added to group "group1"
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And user "Alice" has sent the following space share invitation:
| space | NewSpace |
| sharee | group1 |
| shareType | group |
| permissionsRole | <permissions-role> |
And user "Alice" has sent the following space share invitation:
| space | NewSpace |
| sharee | Carol |
| shareType | user |
| permissionsRole | Space Viewer |
When user "Brian" removes the access of user "Carol" from space "NewSpace" using root endpoint of the Graph API
Then the HTTP status code should be "<status-code>"
And the user "Carol" <shouldOrNot> have a space called "NewSpace"
Examples:
| permissions-role | status-code | shouldOrNot |
| Space Viewer | 403 | should |
| Space Editor | 403 | should |
| Manager | 204 | should not |
Scenario Outline: user of a group removes own group from project space using root endpoint
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And group "group1" has been created
And user "Brian" has been added to group "group1"
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And user "Alice" has sent the following space share invitation:
| space | NewSpace |
| sharee | group1 |
| shareType | group |
| permissionsRole | <permissions-role> |
When user "Brian" removes the access of group "group1" from space "NewSpace" using root endpoint of the Graph API
Then the HTTP status code should be "<status-code>"
And the user "Brian" <shouldOrNot> have a space called "NewSpace"
Examples:
| permissions-role | status-code | shouldOrNot |
| Space Viewer | 403 | should |
| Space Editor | 403 | should |
| Manager | 204 | should not |
@issue-8819
Scenario Outline: user removes himself from the project space using root endpoint
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And user "Alice" has sent the following space share invitation:
| space | NewSpace |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions-role> |
When user "Brian" removes the access of user "Brian" from space "NewSpace" using root endpoint of the Graph API
Then the HTTP status code should be "<status-code>"
And the user "Brian" <shouldOrNot> have a space called "NewSpace"
Examples:
| permissions-role | status-code | shouldOrNot |
| Space Viewer | 403 | should |
| Space Editor | 403 | should |
| Manager | 204 | should not |
@issue-8819
Scenario Outline: user removes another user from project space using permissions endpoint
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And user "Alice" has sent the following space share invitation:
| space | NewSpace |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions-role> |
And user "Alice" has sent the following space share invitation:
| space | NewSpace |
| sharee | Carol |
| shareType | user |
| permissionsRole | Space Viewer |
When user "Brian" removes the access of user "Carol" from space "NewSpace" using permissions endpoint of the Graph API
Then the HTTP status code should be "<status-code>"
And the user "Carol" <shouldOrNot> have a space called "NewSpace"
Examples:
| permissions-role | status-code | shouldOrNot |
| Space Viewer | 403 | should |
| Space Editor | 403 | should |
| Manager | 204 | should not |
Scenario: user cannot remove himself from the project space if he is the last manager using root endpoint
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
When user "Alice" tries to remove own access from space "NewSpace" using root endpoint of the Graph API
Then the HTTP status code should be "403"
And the user "Alice" should have a space called "NewSpace"
Scenario: user of a group cannot remove own group from project space if it is the last manager using root endpoint
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And group "group1" has been created
And user "Brian" has been added to group "group1"
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And user "Alice" has sent the following space share invitation:
| space | NewSpace |
| sharee | group1 |
| shareType | group |
| permissionsRole | Manager |
And user "Alice" has removed own access from space "NewSpace"
When user "Brian" tries to remove the access of group "group1" from space "NewSpace" using root endpoint of the Graph API
Then the HTTP status code should be "403"
And the user "Brian" should have a space called "NewSpace"
@issue-7879
Scenario Outline: user removes link share from project space using root endpoint
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And user "Alice" has created the following space link share:
| space | NewSpace |
| permissionsRole | <permissions-role> |
| password | %public% |
When user "Alice" removes the link from space "NewSpace" using root endpoint of the Graph API
Then the HTTP status code should be "204"
And user "Alice" should not have any "link" permissions on space "NewSpace"
Examples:
| permissions-role |
| view |
| edit |
| upload |
| createOnly |
Scenario: user removes internal link share from project space using root endpoint
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And user "Alice" has created the following space link share:
| space | NewSpace |
| permissionsRole | internal |
When user "Alice" removes the link from space "NewSpace" using root endpoint of the Graph API
Then the HTTP status code should be "204"
And user "Alice" should not have any "link" permissions on space "NewSpace"
@issue-7879
Scenario Outline: user tries to remove link share of project space owned by next user using root endpoint
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And user "Alice" has created the following space link share:
| space | NewSpace |
| permissionsRole | <permissions-role> |
| password | %public% |
When user "Brian" tries to remove the link from space "NewSpace" owned by "Alice" using root endpoint of the Graph API
Then the HTTP status code should be "404"
Examples:
| permissions-role |
| view |
| edit |
| upload |
| createOnly |
Scenario: user tries to remove internal link share of project space owned by next user using root endpoint
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And user "Alice" has created the following space link share:
| space | NewSpace |
| permissionsRole | internal |
When user "Brian" tries to remove the link from space "NewSpace" owned by "Alice" using root endpoint of the Graph API
Then the HTTP status code should be "404"
Scenario Outline: user removes link share of a project drive using permissions endpoint
Given using spaces DAV path
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "projectSpace" with the default quota using the Graph API
And user "Alice" has created the following space link share:
| space | projectSpace |
| permissionsRole | <permissions-role> |
| password | %public% |
When user "Alice" removes the last link share of space "projectSpace" using permissions endpoint of the Graph API
Then the HTTP status code should be "204"
And user "Alice" should not have any "link" permissions on space "projectSpace"
Examples:
| permissions-role |
| view |
| edit |
| upload |
| createOnly |
Scenario: user removes internal link share of a project drive using permissions endpoint
Given using spaces DAV path
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "projectSpace" with the default quota using the Graph API
And user "Alice" has created the following space link share:
| space | projectSpace |
| permissionsRole | internal |
When user "Alice" removes the last link share of space "projectSpace" using permissions endpoint of the Graph API
Then the HTTP status code should be "204"
And user "Alice" should not have any "link" permissions on space "projectSpace"
@env-config
Scenario: remove space share after the share role Space Editor Without Versions has been disabled
Given using spaces DAV path
And the administrator has enabled the permissions role "Space Editor Without Versions"
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has sent the following space share invitation:
| space | new-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | Space Editor Without Versions |
And the administrator has disabled the permissions role "Space Editor Without Versions"
When user "Alice" removes the access of user "Brian" from space "new-space" using root endpoint of the Graph API
Then the HTTP status code should be "204"
And the user "Brian" should not have a space called "NewSpace"
@env-config
Scenario: remove space share from group after the share role Space Editor Without Versions has been disabled
Given using spaces DAV path
And the administrator has enabled the permissions role "Space Editor Without Versions"
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And group "group1" has been created
And user "Brian" has been added to group "group1"
And user "Alice" has sent the following space share invitation:
| space | new-space |
| sharee | group1 |
| shareType | group |
| permissionsRole | Space Editor Without Versions |
And the administrator has disabled the permissions role "Space Editor Without Versions"
When user "Alice" removes the access of group "group1" from space "new-space" using root endpoint of the Graph API
Then the HTTP status code should be "204"
And the user "Brian" should not have a space called "new-space"
@@ -0,0 +1,313 @@
Feature: Remove access to a drive item
https://docs.qsfera.eu/libre-graph-api/#/drives.permissions/DeletePermission
Background:
Given these users have been created with default attributes:
| username |
| Alice |
| Brian |
And using spaces DAV path
Scenario Outline: user removes access to resource in the user share
Given user "Alice" has created folder "FolderToShare"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "textfile.txt"
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions-role> |
When user "Alice" removes the access of user "Brian" from resource "<resource>" of space "Personal" using the Graph API
Then the HTTP status code should be "204"
And for user "Brian" the space "Shares" should not contain these entries:
| <resource> |
Examples:
| permissions-role | resource |
| Viewer | textfile.txt |
| File Editor | textfile.txt |
| Viewer | FolderToShare |
| Editor | FolderToShare |
| Uploader | FolderToShare |
Scenario Outline: user removes access to resource inside of a project space in the user share
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And user "Alice" has created a folder "FolderToShare" in space "NewSpace"
And user "Alice" has uploaded a file inside space "NewSpace" with content "some content" to "textfile.txt"
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | NewSpace |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions-role> |
When user "Alice" removes the access of user "Brian" from resource "<resource>" of space "NewSpace" using the Graph API
Then the HTTP status code should be "204"
And for user "Brian" the space "Shares" should not contain these entries:
| <resource> |
Examples:
| permissions-role | resource |
| Viewer | textfile.txt |
| File Editor | textfile.txt |
| Viewer | FolderToShare |
| Editor | FolderToShare |
| Uploader | FolderToShare |
Scenario Outline: user removes access to a resource in a group share
Given group "group1" has been created
And user "Brian" has been added to group "group1"
And user "Alice" has been added to group "group1"
And user "Alice" has created folder "FolderToShare"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "textfile.txt"
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | Personal |
| sharee | group1 |
| shareType | group |
| permissionsRole | <permissions-role> |
When user "Alice" removes the access of group "group1" from resource "<resource>" of space "Personal" using the Graph API
Then the HTTP status code should be "204"
And for user "Brian" the space "Shares" should not contain these entries:
| <resource> |
Examples:
| permissions-role | resource |
| Viewer | textfile.txt |
| File Editor | textfile.txt |
| Viewer | FolderToShare |
| Editor | FolderToShare |
| Uploader | FolderToShare |
Scenario Outline: user removes access to a resource inside of a project space in group share
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And user "Alice" has created a folder "FolderToShare" in space "NewSpace"
And user "Alice" has uploaded a file inside space "NewSpace" with content "some content" to "textfile.txt"
And group "group1" has been created
And user "Brian" has been added to group "group1"
And user "Alice" has been added to group "group1"
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | NewSpace |
| sharee | group1 |
| shareType | group |
| permissionsRole | <permissions-role> |
When user "Alice" removes the access of group "group1" from resource "<resource>" of space "NewSpace" using the Graph API
Then the HTTP status code should be "204"
And for user "Brian" the space "Shares" should not contain these entries:
| <resource> |
Examples:
| permissions-role | resource |
| Viewer | textfile.txt |
| File Editor | textfile.txt |
| Viewer | FolderToShare |
| Editor | FolderToShare |
| Uploader | FolderToShare |
Scenario Outline: user removes user member from project space using permissions endpoint
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And user "Alice" has sent the following space share invitation:
| space | NewSpace |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions-role> |
When user "Alice" removes the access of user "Brian" from space "NewSpace" using permissions endpoint of the Graph API
Then the HTTP status code should be "204"
And the user "Brian" should not have a space called "NewSpace"
Examples:
| permissions-role |
| Space Viewer |
| Space Editor |
| Manager |
Scenario Outline: user removes group from project space using permissions endpoint
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And group "group1" has been created
And user "Brian" has been added to group "group1"
And user "Alice" has sent the following space share invitation:
| space | NewSpace |
| sharee | group1 |
| shareType | group |
| permissionsRole | <permissions-role> |
When user "Alice" removes the access of group "group1" from space "NewSpace" using permissions endpoint of the Graph API
Then the HTTP status code should be "204"
And the user "Brian" should not have a space called "NewSpace"
Examples:
| permissions-role |
| Space Viewer |
| Space Editor |
| Manager |
@env-config
Scenario Outline: remove share after the share role Secure Viewer has been disabled (Personal Space)
Given the administrator has enabled the permissions role "Secure Viewer"
And user "Alice" has uploaded file with content "some content" to "textfile.txt"
And user "Alice" has created folder "folderToShare"
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Secure Viewer |
And the administrator has disabled the permissions role "Secure Viewer"
When user "Alice" removes the access of user "Brian" from resource "<resource>" of space "Personal" using the Graph API
Then the HTTP status code should be "204"
And for user "Brian" the space "Shares" should not contain these entries:
| <resource> |
Examples:
| resource |
| textfile.txt |
| folderToShare |
@env-config
Scenario: remove share after the share role Denied has been disabled (Personal Space)
Given the administrator has enabled the permissions role "Denied"
And user "Alice" has created folder "folderToShare"
And user "Alice" has sent the following resource share invitation:
| resource | folderToShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Denied |
And the administrator has disabled the permissions role "Denied"
When user "Alice" removes the access of user "Brian" from resource "folderToShare" of space "Personal" using the Graph API
Then the HTTP status code should be "204"
And for user "Brian" the space "Shares" should not contain these entries:
| folderToShare |
@env-config
Scenario Outline: remove share after the share role Secure Viewer has been disabled (Project Space)
Given using spaces DAV path
And the administrator has enabled the permissions role "Secure Viewer"
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "textfile.txt"
And user "Alice" has created a folder "folderToShare" in space "new-space"
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | new-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | Secure Viewer |
And the administrator has disabled the permissions role "Secure Viewer"
When user "Alice" removes the access of user "Brian" from resource "<resource>" of space "new-space" using the Graph API
Then the HTTP status code should be "204"
And for user "Brian" the space "Shares" should not contain these entries:
| <resource> |
Examples:
| resource |
| textfile.txt |
| folderToShare |
@env-config
Scenario: remove share after the share role Denied has been disabled (Project Space)
Given using spaces DAV path
And the administrator has enabled the permissions role "Denied"
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has created a folder "folderToShare" in space "new-space"
And user "Alice" has sent the following resource share invitation:
| resource | folderToShare |
| space | new-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | Denied |
And the administrator has disabled the permissions role "Denied"
When user "Alice" removes the access of user "Brian" from resource "folderToShare" of space "new-space" using the Graph API
Then the HTTP status code should be "204"
And for user "Brian" the space "Shares" should not contain these entries:
| folderToShare |
@env-config
Scenario Outline: remove share from group after the share role Secure Viewer has been disabled (Personal Space)
Given the administrator has enabled the permissions role "Secure Viewer"
And group "group1" has been created
And user "Brian" has been added to group "group1"
And user "Alice" has uploaded file with content "some content" to "textfile.txt"
And user "Alice" has created folder "folderToShare"
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | Personal |
| sharee | group1 |
| shareType | group |
| permissionsRole | Secure Viewer |
And the administrator has disabled the permissions role "Secure Viewer"
When user "Alice" removes the access of group "group1" from resource "<resource>" of space "Personal" using the Graph API
Then the HTTP status code should be "204"
And for user "Brian" the space "Shares" should not contain these entries:
| <resource> |
Examples:
| resource |
| textfile.txt |
| folderToShare |
@env-config
Scenario: remove share from group after the share role Denied has been disabled (Personal Space)
Given the administrator has enabled the permissions role "Denied"
And group "group1" has been created
And user "Brian" has been added to group "group1"
And user "Alice" has created folder "folderToShare"
And user "Alice" has sent the following resource share invitation:
| resource | folderToShare |
| space | Personal |
| sharee | group1 |
| shareType | group |
| permissionsRole | Denied |
And the administrator has disabled the permissions role "Denied"
When user "Alice" removes the access of group "group1" from resource "folderToShare" of space "Personal" using the Graph API
Then the HTTP status code should be "204"
And for user "Brian" the space "Shares" should not contain these entries:
| folderToShare |
@env-config
Scenario Outline: remove share from group after the share role Secure Viewer has been disabled (Project Space)
Given using spaces DAV path
And the administrator has enabled the permissions role "Secure Viewer"
And group "group1" has been created
And user "Brian" has been added to group "group1"
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "textfile.txt"
And user "Alice" has created a folder "folderToShare" in space "new-space"
And user "Alice" has sent the following resource share invitation:
| resource | <resource> |
| space | new-space |
| sharee | group1 |
| shareType | group |
| permissionsRole | Secure Viewer |
And the administrator has disabled the permissions role "Secure Viewer"
When user "Alice" removes the access of group "group1" from resource "<resource>" of space "new-space" using the Graph API
Then the HTTP status code should be "204"
And for user "Brian" the space "Shares" should not contain these entries:
| <resource> |
Examples:
| resource |
| textfile.txt |
| folderToShare |
@env-config
Scenario: remove share from group after the share role Denied has been disabled (Project Space)
Given using spaces DAV path
And the administrator has enabled the permissions role "Denied"
And group "group1" has been created
And user "Brian" has been added to group "group1"
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has created a folder "folderToShare" in space "new-space"
And user "Alice" has sent the following resource share invitation:
| resource | folderToShare |
| space | new-space |
| sharee | group1 |
| shareType | group |
| permissionsRole | Denied |
And the administrator has disabled the permissions role "Denied"
When user "Alice" removes the access of group "group1" from resource "folderToShare" of space "new-space" using the Graph API
Then the HTTP status code should be "204"
And for user "Brian" the space "Shares" should not contain these entries:
| folderToShare |
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff