diff --git a/.drone.star b/.drone.star index 61897dd6c62..e00d0116d59 100644 --- a/.drone.star +++ b/.drone.star @@ -33,6 +33,7 @@ config = { 'webUISharingFilePermissionsGroups': 'SharingFilePermissionsGroups', 'webUISharingFolderPermissionsGroups': 'SharingFolderPermissionsGroups', 'webUISharingFolderAdvancedPermissionsGroups': 'SharingFolderAdvPermissionsGrp', + 'webUISharingPermissionToRoot': 'SharingPermissionToRoot', 'webUIResharing': 'Resharing', 'webUIResharingToRoot': 'ResharingToRoot', 'webUISharingPublic': 'SharingPublic', diff --git a/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature b/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature index 09ef34671d5..6779c7f4ef3 100644 --- a/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature +++ b/tests/acceptance/features/webUISharingFilePermissionMultipleUsers/shareFileWithMultipleUsers.feature @@ -5,7 +5,9 @@ Feature: Sharing files with multiple internal users with different permissions So that I can control the access on those files by other collaborators Background: - Given these users have been created with default attributes: + Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" + And the administrator has set the default folder for received shares to "Shares" + And these users have been created with default attributes: | username | | user1 | | user2 | @@ -28,6 +30,8 @@ Feature: Sharing files with multiple internal users with different permissions And the user removes "User Four" as a collaborator from the share And the user removes "Regular User" as a collaborator from the share And the user shares with the selected collaborators + And user "user2" accepts the share "lorem.txt" offered by user "user1" using the sharing API + And user "user3" accepts the share "lorem.txt" offered by user "user1" using the sharing API Then custom permissions "" should be set for user "User Two" for file "lorem.txt" on the webUI And custom permissions "" should be set for user "User Three" for file "lorem.txt" on the webUI And user "User Two" should be listed as "" in the collaborators list for file "lorem.txt" on the webUI @@ -36,20 +40,20 @@ Feature: Sharing files with multiple internal users with different permissions | field | value | | uid_owner | user1 | | share_with | user2 | - | file_target | /lorem (2).txt | + | file_target | /Shares/lorem.txt | | item_type | file | | permissions | | And user "user3" should have received a share with these details: | field | value | | uid_owner | user1 | | share_with | user3 | - | file_target | /lorem (2).txt | + | file_target | /Shares/lorem.txt | | item_type | file | | permissions | | But user "Regular User" should not be listed in the collaborators list on the webUI - And as "user0" file "lorem (2).txt" should not exist + And as "user0" file "/Shares/lorem.txt" should not exist And user "User Four" should not be listed in the collaborators list on the webUI - And as "user4" file "lorem(2).txt" should not exist + And as "user4" file "/Shares/lorem.txt" should not exist Examples: | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | | Viewer | Viewer | share | share | read, share | diff --git a/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature b/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature index e464f744f30..67f266c7a75 100644 --- a/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature +++ b/tests/acceptance/features/webUISharingFilePermissionsGroups/sharePermissionsGroup.feature @@ -5,7 +5,9 @@ Feature: Sharing files with internal groups with permissions So that I can control the access on those files by other users on the group Background: - Given these users have been created with default attributes: + Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" + And the administrator has set the default folder for received shares to "Shares" + And these users have been created with default attributes: | username | | user1 | | user2 | @@ -30,6 +32,8 @@ Feature: Sharing files with internal groups with permissions | grp2 | group | And the user removes "grp1" as a collaborator from the share And the user shares with the selected collaborators + And user "user2" accepts the share "lorem.txt" offered by user "user1" using the sharing API + And user "user3" accepts the share "lorem.txt" offered by user "user1" using the sharing API Then custom permissions "" should be set for user "grp2" for file "lorem.txt" on the webUI And custom permissions "" should be set for user "User Three" for file "lorem.txt" on the webUI And group "grp2" should be listed as "" in the collaborators list for file "lorem.txt" on the webUI @@ -38,18 +42,18 @@ Feature: Sharing files with internal groups with permissions | field | value | | uid_owner | user1 | | share_with | grp2 | - | file_target | /lorem (2).txt | + | file_target | /Shares/lorem.txt | | item_type | file | | permissions | | And user "user3" should have received a share with these details: | field | value | | uid_owner | user1 | | share_with | user3 | - | file_target | /lorem (2).txt | + | file_target | /Shares/lorem.txt | | item_type | file | | permissions | | But group "grp1" should not be listed in the collaborators list on the webUI - And as "user1" file "lorem (2).txt" should not exist + And as "user1" file "/Shares/lorem.txt" should not exist Examples: | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | | Viewer | Viewer | share | share | read, share | diff --git a/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature b/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature index 92d48244a0c..15476fec3ef 100644 --- a/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature +++ b/tests/acceptance/features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature @@ -5,7 +5,9 @@ Feature: Sharing folders with multiple internal users using advanced permissions So that I can control the access on those folders by other collaborators Background: - Given these users have been created with default attributes: + Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" + And the administrator has set the default folder for received shares to "Shares" + And these users have been created with default attributes: | username | | user1 | | user2 | @@ -28,6 +30,8 @@ Feature: Sharing folders with multiple internal users using advanced permissions And the user removes "User Four" as a collaborator from the share And the user removes "Regular User" as a collaborator from the share And the user shares with the selected collaborators + And user "user2" accepts the share "simple-folder" offered by user "user1" using the sharing API + And user "user3" accepts the share "simple-folder" offered by user "user1" using the sharing API Then custom permissions "" should be set for user "User Two" for folder "simple-folder" on the webUI And custom permissions "" should be set for user "User Three" for folder "simple-folder" on the webUI And user "User Two" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI @@ -36,20 +40,20 @@ Feature: Sharing folders with multiple internal users using advanced permissions | field | value | | uid_owner | user1 | | share_with | user2 | - | file_target | /simple-folder (2) | + | file_target | /Shares/simple-folder | | item_type | folder | | permissions | | And user "user3" should have received a share with these details: | field | value | | uid_owner | user1 | | share_with | user3 | - | file_target | /simple-folder (2) | + | file_target | /Shares/simple-folder | | item_type | folder | | permissions | | But user "Regular User" should not be listed in the collaborators list on the webUI - And as "user0" folder "simple-folder (2)" should not exist + And as "user0" folder "/Shares/simple-folder" should not exist And user "User Four" should not be listed in the collaborators list on the webUI - And as "user4" folder "simple-folder (2)" should not exist + And as "user4" folder "/Shares/simple-folder" should not exist Examples: | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | | Advanced permissions | Advanced permissions | delete | delete | read, delete | diff --git a/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature b/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature index cce359c5ada..dc05eb23721 100644 --- a/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature +++ b/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature @@ -5,7 +5,9 @@ Feature: Sharing folders with internal groups with role as advanced permissions So that I can control the access on those folders by other users on the group Background: - Given these users have been created with default attributes: + Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" + And the administrator has set the default folder for received shares to "Shares" + And these users have been created with default attributes: | username | | user1 | | user2 | @@ -31,6 +33,8 @@ Feature: Sharing folders with internal groups with role as advanced permissions And the user removes "grp1" as a collaborator from the share And the user removes "User One" as a collaborator from the share And the user shares with the selected collaborators + And user "user2" accepts the share "simple-folder" offered by user "user1" using the sharing API + And user "user3" accepts the share "simple-folder" offered by user "user1" using the sharing API Then custom permissions "" should be set for user "grp2" for folder "simple-folder" on the webUI And custom permissions "" should be set for user "User Three" for folder "simple-folder" on the webUI And group "grp2" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI @@ -39,18 +43,18 @@ Feature: Sharing folders with internal groups with role as advanced permissions | field | value | | uid_owner | user1 | | share_with | grp2 | - | file_target | /simple-folder (2) | + | file_target | /Shares/simple-folder | | item_type | folder | | permissions | | And user "user3" should have received a share with these details: | field | value | | uid_owner | user1 | | share_with | user3 | - | file_target | /simple-folder (2) | + | file_target | /Shares/simple-folder | | item_type | folder | | permissions | | But group "grp1" should not be listed in the collaborators list on the webUI - And as "user1" folder "simple-folder (2)" should not exist + And as "user1" folder "/Shares/simple-folder" should not exist Examples: | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | | Advanced permissions | Advanced permissions | delete | delete | read, delete | diff --git a/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature b/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature index 660e4b72e97..b62813342b9 100644 --- a/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature +++ b/tests/acceptance/features/webUISharingFolderPermissionMultipleUsers/shareFolderWithMultipleUsers.feature @@ -5,7 +5,9 @@ Feature: Sharing folders with multiple internal users with different permissions So that I can control the access on those folders by other collaborators Background: - Given these users have been created with default attributes: + Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" + And the administrator has set the default folder for received shares to "Shares" + And these users have been created with default attributes: | username | | user1 | | user2 | @@ -28,6 +30,8 @@ Feature: Sharing folders with multiple internal users with different permissions And the user removes "User Four" as a collaborator from the share And the user removes "Regular User" as a collaborator from the share And the user shares with the selected collaborators + And user "user2" accepts the share "simple-folder" offered by user "user1" using the sharing API + And user "user3" accepts the share "simple-folder" offered by user "user1" using the sharing API Then custom permissions "" should be set for user "User Two" for folder "simple-folder" on the webUI And custom permissions "" should be set for user "User Three" for folder "simple-folder" on the webUI And user "User Two" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI @@ -36,14 +40,14 @@ Feature: Sharing folders with multiple internal users with different permissions | field | value | | uid_owner | user1 | | share_with | user2 | - | file_target | /simple-folder (2) | + | file_target | /Shares/simple-folder | | item_type | folder | | permissions | | And user "user3" should have received a share with these details: | field | value | | uid_owner | user1 | | share_with | user3 | - | file_target | /simple-folder (2) | + | file_target | /Shares/simple-folder | | item_type | folder | | permissions | | But user "Regular User" should not be listed in the collaborators list on the webUI diff --git a/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature b/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature index 6e50cd33144..d0ad39bcabc 100644 --- a/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature +++ b/tests/acceptance/features/webUISharingFolderPermissionsGroups/sharePermissionsGroup.feature @@ -5,7 +5,9 @@ Feature: Sharing folders with internal groups with different roles and permissio So that I can control the access on those folders by other users on the group Background: - Given these users have been created with default attributes: + Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" + And the administrator has set the default folder for received shares to "Shares" + And these users have been created with default attributes: | username | | user1 | | user2 | @@ -31,26 +33,28 @@ Feature: Sharing folders with internal groups with different roles and permissio And the user removes "grp1" as a collaborator from the share And the user removes "User One" as a collaborator from the share And the user shares with the selected collaborators + And user "user2" accepts the share "simple-folder" offered by user "user1" using the sharing API + And user "user3" accepts the share "simple-folder" offered by user "user1" using the sharing API Then custom permissions "" should be set for user "grp2" for folder "simple-folder" on the webUI And custom permissions "" should be set for user "User Three" for folder "simple-folder" on the webUI And group "grp2" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI And user "User Three" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI - And user "user2" should have received a share with these details: + Then user "user2" should have received a share with these details: | field | value | | uid_owner | user1 | | share_with | grp2 | - | file_target | /simple-folder (2) | + | file_target | /Shares/simple-folder | | item_type | folder | | permissions | | And user "user3" should have received a share with these details: | field | value | | uid_owner | user1 | | share_with | user3 | - | file_target | /simple-folder (2) | + | file_target | /Shares/simple-folder | | item_type | folder | | permissions | | But group "grp1" should not be listed in the collaborators list on the webUI - And as "user1" folder "simple-folder (2)" should not exist + And as "user1" folder "/Shares/simple-folder" should not exist Examples: | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | | Viewer | Viewer | share | share | read, share | diff --git a/tests/acceptance/features/webUISharingPermissionToRoot/shareAdvancePermissionsGroup.feature b/tests/acceptance/features/webUISharingPermissionToRoot/shareAdvancePermissionsGroup.feature new file mode 100644 index 00000000000..feb8e10e513 --- /dev/null +++ b/tests/acceptance/features/webUISharingPermissionToRoot/shareAdvancePermissionsGroup.feature @@ -0,0 +1,67 @@ +@skipOnOCIS +Feature: Sharing folders with internal groups with role as advanced permissions + As a user + I want to set different permissions on shared folders with groups + So that I can control the access on those folders by other users on the group + + Background: + Given these users have been created with default attributes: + | username | + | user1 | + | user2 | + | user3 | + And these groups have been created: + | groupname | + | grp1 | + And user "user1" has been added to group "grp1" + And user "user2" has been added to group "grp1" + + @issue-1837 + Scenario Outline: share a folder with multiple users with role as advanced permissions and different extra permissions + Given group "grp2" has been created + And user "user2" has been added to group "grp2" + And user "user1" has logged in using the webUI + When the user opens the share dialog for folder "simple-folder" using the webUI + And the user opens the share creation dialog in the webUI + And the user selects the following collaborators for the share as "" with "" permissions: + | collaborator | type | + | grp1 | group | + | User Three | user | + | grp2 | group | + And the user removes "grp1" as a collaborator from the share + And the user removes "User One" as a collaborator from the share + And the user shares with the selected collaborators + Then custom permissions "" should be set for user "grp2" for folder "simple-folder" on the webUI + And custom permissions "" should be set for user "User Three" for folder "simple-folder" on the webUI + And group "grp2" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI + And user "User Three" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI + And user "user2" should have received a share with these details: + | field | value | + | uid_owner | user1 | + | share_with | grp2 | + | file_target | /simple-folder (2) | + | item_type | folder | + | permissions | | + And user "user3" should have received a share with these details: + | field | value | + | uid_owner | user1 | + | share_with | user3 | + | file_target | /simple-folder (2) | + | item_type | folder | + | permissions | | + But group "grp1" should not be listed in the collaborators list on the webUI + And as "user1" folder "simple-folder (2)" should not exist + Examples: + | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | + # | Advanced permissions | Advanced permissions | delete | delete | read, delete | + # | Advanced permissions | Advanced permissions | update | update | read, update | + # | Advanced permissions | Advanced permissions | create | create | read, create | + # | Advanced permissions | Advanced permissions | share, delete | share, delete | read, share, delete | + # | Advanced permissions | Advanced permissions | share, update | share, update | read, update, share | + # | Advanced permissions | Advanced permissions | share, create | share, create | read, share, create | + # | Advanced permissions | Advanced permissions | delete, update | delete, update | read, delete, update | + # | Advanced permissions | Advanced permissions | delete, create | delete, create | read, delete, create | + # | Advanced permissions | Advanced permissions | update, create | update, create | read, update, create | + # | Advanced permissions | Advanced permissions | share, delete, update | share, delete, update | read, share, delete, update | + # | Advanced permissions | Advanced permissions | share, create, delete | share, create, delete | read, share, delete, create | + | Advanced permissions | Advanced permissions | share, update, create | share, update, create | read, share, update, create | diff --git a/tests/acceptance/features/webUISharingPermissionToRoot/shareFileWithMultipleUsers.feature b/tests/acceptance/features/webUISharingPermissionToRoot/shareFileWithMultipleUsers.feature new file mode 100644 index 00000000000..8e9c6e8b06b --- /dev/null +++ b/tests/acceptance/features/webUISharingPermissionToRoot/shareFileWithMultipleUsers.feature @@ -0,0 +1,62 @@ +@skipOnOCIS +Feature: Sharing files with multiple internal users with different permissions + As a user + I want to set different permissions on shared files with other users + So that I can control the access on those files by other collaborators + + Background: + Given these users have been created with default attributes: + | username | + | user1 | + | user2 | + + Scenario Outline: share a file with multiple users with different roles and permissions + Given these users have been created with default attributes: + | username | + | user0 | + | user3 | + | user4 | + And user "user1" has logged in using the webUI + When the user opens the share dialog for file "lorem.txt" using the webUI + And the user opens the share creation dialog in the webUI + And the user selects the following collaborators for the share as "" with "" permissions: + | collaborator | type | + | Regular User | user | + | User Two | user | + | User Three | user | + | User Four | user | + And the user removes "User Four" as a collaborator from the share + And the user removes "Regular User" as a collaborator from the share + And the user shares with the selected collaborators + Then custom permissions "" should be set for user "User Two" for file "lorem.txt" on the webUI + And custom permissions "" should be set for user "User Three" for file "lorem.txt" on the webUI + And user "User Two" should be listed as "" in the collaborators list for file "lorem.txt" on the webUI + And user "User Three" should be listed as "" in the collaborators list for file "lorem.txt" on the webUI + And user "user2" should have received a share with these details: + | field | value | + | uid_owner | user1 | + | share_with | user2 | + | file_target | /lorem (2).txt | + | item_type | file | + | permissions | | + And user "user3" should have received a share with these details: + | field | value | + | uid_owner | user1 | + | share_with | user3 | + | file_target | /lorem (2).txt | + | item_type | file | + | permissions | | + But user "Regular User" should not be listed in the collaborators list on the webUI + And as "user0" file "lorem (2).txt" should not exist + And user "User Four" should not be listed in the collaborators list on the webUI + And as "user4" file "lorem(2).txt" should not exist + Examples: + | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | + # | Viewer | Viewer | share | share | read, share | + # | Viewer | Viewer | , | , | read | + # | Editor | Editor | share | share | share, read, update | + # | Editor | Editor | , | , | read, update | + # | Advanced permissions | Viewer | , | , | read | + # | Advanced permissions | Viewer | share | share | read, share | + # | Advanced permissions | Editor | update | , | read, update | + | Advanced permissions | Editor | share, update | share | read, update, share | diff --git a/tests/acceptance/features/webUISharingPermissionToRoot/shareFolderWithMultipleUsers.feature b/tests/acceptance/features/webUISharingPermissionToRoot/shareFolderWithMultipleUsers.feature new file mode 100644 index 00000000000..a30015be5a8 --- /dev/null +++ b/tests/acceptance/features/webUISharingPermissionToRoot/shareFolderWithMultipleUsers.feature @@ -0,0 +1,62 @@ +@skipOnOCIS +Feature: Sharing folders with multiple internal users with different permissions + As a user + I want to set different permissions on shared folders with other users + So that I can control the access on those folders by other collaborators + + Background: + Given these users have been created with default attributes: + | username | + | user1 | + | user2 | + + Scenario Outline: share a folder with multiple users with different roles and permissions + Given these users have been created with default attributes: + | username | + | user0 | + | user3 | + | user4 | + And user "user1" has logged in using the webUI + When the user opens the share dialog for folder "simple-folder" using the webUI + And the user opens the share creation dialog in the webUI + And the user selects the following collaborators for the share as "" with "" permissions: + | collaborator | type | + | Regular User | user | + | User Two | user | + | User Three | user | + | User Four | user | + And the user removes "User Four" as a collaborator from the share + And the user removes "Regular User" as a collaborator from the share + And the user shares with the selected collaborators + Then custom permissions "" should be set for user "User Two" for folder "simple-folder" on the webUI + And custom permissions "" should be set for user "User Three" for folder "simple-folder" on the webUI + And user "User Two" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI + And user "User Three" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI + And user "user2" should have received a share with these details: + | field | value | + | uid_owner | user1 | + | share_with | user2 | + | file_target | /simple-folder (2) | + | item_type | folder | + | permissions | | + And user "user3" should have received a share with these details: + | field | value | + | uid_owner | user1 | + | share_with | user3 | + | file_target | /simple-folder (2) | + | item_type | folder | + | permissions | | + But user "Regular User" should not be listed in the collaborators list on the webUI + And as "user0" folder "simple-folder (2)" should not exist + And user "User Four" should not be listed in the collaborators list on the webUI + And as "user4" folder "simple-folder (2)" should not exist + Examples: + | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | + # | Viewer | Viewer | share | share | read, share | + # | Viewer | Viewer | , | , | read | + # | Editor | Editor | share | share | all | + # | Editor | Editor | , | , | read, update, delete, create | + # | Advanced permissions | Viewer | , | , | read | + # | Advanced permissions | Viewer | share | share | read, share | + # | Advanced permissions | Editor | delete, update, create | , | read, delete, update, create | + | Advanced permissions | Editor | share, delete, update, create | share | all | diff --git a/tests/acceptance/features/webUISharingPermissionToRoot/sharePermissionsFileGroup.feature b/tests/acceptance/features/webUISharingPermissionToRoot/sharePermissionsFileGroup.feature new file mode 100644 index 00000000000..bf62aa183e6 --- /dev/null +++ b/tests/acceptance/features/webUISharingPermissionToRoot/sharePermissionsFileGroup.feature @@ -0,0 +1,62 @@ +@skipOnOCIS +Feature: Sharing files with internal groups with permissions + As a user + I want to set different permissions on shared files with groups + So that I can control the access on those files by other users on the group + + Background: + Given these users have been created with default attributes: + | username | + | user1 | + | user2 | + | user3 | + And these groups have been created: + | groupname | + | grp1 | + And user "user1" has been added to group "grp1" + And user "user2" has been added to group "grp1" + + Scenario Outline: share a file with multiple users with different roles and permissions + Given user "user0" has been created with default attributes + And group "grp2" has been created + And user "user2" has been added to group "grp2" + And user "user1" has logged in using the webUI + When the user opens the share dialog for file "lorem.txt" using the webUI + And the user opens the share creation dialog in the webUI + And the user selects the following collaborators for the share as "" with "" permissions: + | collaborator | type | + | grp1 | group | + | User Three | user | + | grp2 | group | + And the user removes "grp1" as a collaborator from the share + And the user shares with the selected collaborators + Then custom permissions "" should be set for user "grp2" for file "lorem.txt" on the webUI + And custom permissions "" should be set for user "User Three" for file "lorem.txt" on the webUI + And group "grp2" should be listed as "" in the collaborators list for file "lorem.txt" on the webUI + And user "User Three" should be listed as "" in the collaborators list for file "lorem.txt" on the webUI + And user "user2" should have received a share with these details: + | field | value | + | uid_owner | user1 | + | share_with | grp2 | + | file_target | /lorem (2).txt | + | item_type | file | + | permissions | | + And user "user3" should have received a share with these details: + | field | value | + | uid_owner | user1 | + | share_with | user3 | + | file_target | /lorem (2).txt | + | item_type | file | + | permissions | | + But group "grp1" should not be listed in the collaborators list on the webUI + And as "user1" file "lorem (2).txt" should not exist + Examples: + | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | + # | Viewer | Viewer | share | share | read, share | + # | Viewer | Viewer | , | , | read | + # | Editor | Editor | share | share | share, read, update | + # | Editor | Editor | , | , | read, update | + # | Advanced permissions | Viewer | , | , | read | + # | Advanced permissions | Viewer | share | share | read, share | + # | Advanced permissions | Editor | update | , | read, update | + | Advanced permissions | Editor | share, update | share | read, update, share | diff --git a/tests/acceptance/features/webUISharingPermissionToRoot/sharePermissionsFoldersGroup.feature b/tests/acceptance/features/webUISharingPermissionToRoot/sharePermissionsFoldersGroup.feature new file mode 100644 index 00000000000..80b1ce71c52 --- /dev/null +++ b/tests/acceptance/features/webUISharingPermissionToRoot/sharePermissionsFoldersGroup.feature @@ -0,0 +1,63 @@ +@skipOnOCIS +Feature: Sharing folders with internal groups with different roles and permissions + As a user + I want to set different permissions on shared folders with groups + So that I can control the access on those folders by other users on the group + + Background: + Given these users have been created with default attributes: + | username | + | user1 | + | user2 | + | user3 | + And these groups have been created: + | groupname | + | grp1 | + And user "user1" has been added to group "grp1" + And user "user2" has been added to group "grp1" + + @issue-1837 + Scenario Outline: share a folder with multiple users with different roles and permissions + Given group "grp2" has been created + And user "user2" has been added to group "grp2" + And user "user1" has logged in using the webUI + When the user opens the share dialog for folder "simple-folder" using the webUI + And the user opens the share creation dialog in the webUI + And the user selects the following collaborators for the share as "" with "" permissions: + | collaborator | type | + | grp1 | group | + | User Three | user | + | grp2 | group | + And the user removes "grp1" as a collaborator from the share + And the user removes "User One" as a collaborator from the share + And the user shares with the selected collaborators + Then custom permissions "" should be set for user "grp2" for folder "simple-folder" on the webUI + And custom permissions "" should be set for user "User Three" for folder "simple-folder" on the webUI + And group "grp2" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI + And user "User Three" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI + And user "user2" should have received a share with these details: + | field | value | + | uid_owner | user1 | + | share_with | grp2 | + | file_target | /simple-folder (2) | + | item_type | folder | + | permissions | | + And user "user3" should have received a share with these details: + | field | value | + | uid_owner | user1 | + | share_with | user3 | + | file_target | /simple-folder (2) | + | item_type | folder | + | permissions | | + But group "grp1" should not be listed in the collaborators list on the webUI + And as "user1" folder "simple-folder (2)" should not exist + Examples: + | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | + # | Viewer | Viewer | share | share | read, share | + # | Viewer | Viewer | , | , | read | + # | Editor | Editor | share | share | all | + # | Editor | Editor | , | , | read, update, delete, create | + # | Advanced permissions | Viewer | , | , | read | + # | Advanced permissions | Viewer | share | share | read, share | + # | Advanced permissions | Editor | delete, update, create | , | read, delete, update, create | + | Advanced permissions | Editor | share, delete, update, create | share | all | diff --git a/tests/acceptance/features/webUISharingPermissionToRoot/sharePermissionsUsers.feature b/tests/acceptance/features/webUISharingPermissionToRoot/sharePermissionsUsers.feature new file mode 100644 index 00000000000..12668dba326 --- /dev/null +++ b/tests/acceptance/features/webUISharingPermissionToRoot/sharePermissionsUsers.feature @@ -0,0 +1,195 @@ +@skipOnOCIS +Feature: Sharing files and folders with internal users with different permissions + As a user + I want to set different permissions on shared files and folders with other users + So that I can control the access on those files/folders by other collaborators + + Background: + Given these users have been created with default attributes: + | username | + | user1 | + | user2 | + + Scenario: Change permissions of the previously shared folder + Given user "user2" has shared folder "simple-folder" with user "user1" with "read" permissions + And user "user2" has logged in using the webUI + Then no custom permissions should be set for collaborator "User One" for folder "simple-folder" on the webUI + When the user sets custom permission for current role of collaborator "User One" for folder "simple-folder" to "share" using the webUI + Then custom permission "share" should be set for user "User One" for folder "simple-folder" on the webUI + And user "user1" should have received a share with these details: + | field | value | + | uid_owner | user2 | + | share_with | user1 | + | file_target | /simple-folder (2) | + | item_type | folder | + | permissions | read, share | + + @issue-1853 + Scenario: Change permissions of the previously shared folder + Given user "user2" has shared folder "simple-folder" with user "user1" with "read, share, create, delete" permissions + And user "user2" has logged in using the webUI + Then custom permissions "share, create, delete" should be set for user "User One" for folder "simple-folder" on the webUI + When the user sets custom permission for current role of collaborator "User One" for folder "simple-folder" to "create, delete, share" using the webUI + Then custom permission "share, create, delete" should be set for user "User One" for folder "simple-folder" on the webUI + And user "user1" should have received a share with these details: + | field | value | + | uid_owner | user2 | + | share_with | user1 | + | file_target | /simple-folder (2) | + | item_type | folder | + | permissions | read, share, create, delete | + + @issue-1853 + Scenario: Change permissions of the previously shared folder + Given user "user2" has shared folder "simple-folder" with user "user1" with "read, share, create" permissions + And user "user2" has logged in using the webUI + Then custom permissions "share, create" should be set for user "User One" for folder "simple-folder" on the webUI + When the user sets custom permission for current role of collaborator "User One" for folder "simple-folder" to "delete, update" using the webUI + Then custom permission "delete, update" should be set for user "User One" for folder "simple-folder" on the webUI + And user "user1" should have received a share with these details: + | field | value | + | uid_owner | user2 | + | share_with | user1 | + | file_target | /simple-folder (2) | + | item_type | folder | + | permissions | read, update, delete | + + Scenario: Change permissions of the previously shared folder + Given user "user2" has shared folder "simple-folder" with user "user1" with "read, delete" permissions + And user "user2" has logged in using the webUI + Then custom permissions "delete" should be set for user "User One" for folder "simple-folder" on the webUI + When the user sets custom permission for current role of collaborator "User One" for folder "simple-folder" to "create, share" using the webUI + Then custom permission "create, share" should be set for user "User One" for folder "simple-folder" on the webUI + And user "user1" should have received a share with these details: + | field | value | + | uid_owner | user2 | + | share_with | user1 | + | file_target | /simple-folder (2) | + | item_type | folder | + | permissions | read, create, share | + + Scenario Outline: share a folder with another internal user assigning a role and the permissions + Given user "user2" has logged in using the webUI + When the user shares folder "simple-folder" with user "User One" as "" with permissions "" using the webUI + Then user "User One" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI + And custom permissions "" should be set for user "User One" for folder "simple-folder" on the webUI + And user "user1" should have received a share with these details: + | field | value | + | uid_owner | user2 | + | share_with | user1 | + | file_target | /simple-folder (2) | + | item_type | folder | + | permissions | | + Examples: + | role | displayed-role | extra-permissions | displayed-permissions | permissions | + | Viewer | Viewer | share | share | read, share | + | Editor | Editor | share | share | all | + | Advanced permissions | Advanced permissions | share, create | share, create | read, share, create | + | Advanced permissions | Advanced permissions | update, share | share, update | read, update, share | + | Advanced permissions | Editor | delete, share, create, update | share | read, share, delete, update, create | + + Scenario Outline: Change permissions of the previously shared file + Given user "user2" has shared file "lorem.txt" with user "user1" with "" permissions + And user "user2" has logged in using the webUI + Then no custom permissions should be set for collaborator "User One" for file "lorem.txt" on the webUI + When the user sets custom permission for current role of collaborator "User One" for file "lorem.txt" to "share" using the webUI + Then custom permission "share" should be set for user "User One" for file "lorem.txt" on the webUI + And user "user1" should have received a share with these details: + | field | value | + | uid_owner | user2 | + | share_with | user1 | + | file_target | /lorem (2).txt | + | item_type | file | + | permissions | | + Examples: + | initial-permissions | permissions | + | read, update | read, share, update | + | read | read, share | + + Scenario: Delete all custom permissions of the previously shared file + Given user "user2" has shared file "lorem.txt" with user "user1" with "read, share" permissions + And user "user2" has logged in using the webUI + Then custom permissions "share" should be set for user "User One" for file "lorem.txt" on the webUI + When the user disables all the custom permissions of collaborator "User One" for file "lorem.txt" using the webUI + Then no custom permissions should be set for collaborator "User One" for file "lorem.txt" on the webUI + And user "user1" should have received a share with these details: + | field | value | + | uid_owner | user2 | + | share_with | user1 | + | file_target | /lorem (2).txt | + | item_type | file | + | permissions | read | + + Scenario Outline: share a file with another internal user assigning a role and the permissions + Given user "user2" has logged in using the webUI + When the user shares file "lorem.txt" with user "User One" as "" with permissions "" using the webUI + Then user "User One" should be listed as "" in the collaborators list for file "lorem.txt" on the webUI + And custom permissions "" should be set for user "User One" for file "lorem.txt" on the webUI + And user "user1" should have received a share with these details: + | field | value | + | uid_owner | user2 | + | share_with | user1 | + | file_target | /lorem (2).txt | + | item_type | file | + | permissions | | + Examples: + | role | displayed-role | collaborators-permissions | displayed-permissions | permissions | + | Viewer | Viewer | share | share | read, share | + | Editor | Editor | share | share | read, share, update | + | Advanced permissions | Editor | share, update | share | read, share, update | + + Scenario: Share a folder without share permissions using API and check if it is listed on the collaborators list for original owner + Given user "user2" has shared folder "simple-folder" with user "user1" with "read" permissions + And user "user2" has logged in using the webUI + When the user opens the share dialog for folder "simple-folder" using the webUI + Then user "User One" should be listed as "Viewer" in the collaborators list for folder "simple-folder" on the webUI + And no custom permissions should be set for collaborator "User One" for folder "simple-folder" on the webUI + + Scenario: Resource owner upgrades share permissions of a re-share + Given user "user3" has been created with default attributes + And user "user2" has shared folder "simple-folder" with user "user1" with "read, share, delete" permissions + And user "user1" has shared folder "simple-folder (2)" with user "user3" with "read, delete" permissions + And user "user2" has logged in using the webUI + When the user sets custom permission for current role of collaborator "User Three" for folder "simple-folder" to "delete, update" using the webUI + Then custom permissions "delete, update" should be set for user "User Three" for folder "simple-folder" on the webUI + And user "user3" should have received a share with these details: + | field | value | + | uid_owner | user1 | + | share_with | user3 | + | file_target | /simple-folder (2) | + | item_type | folder | + | permissions | delete, read, update | + + Scenario: User is not allowed to reshare sub-folder with more permissions + Given user "user3" has been created with default attributes + And user "user2" has shared folder "simple-folder" with user "user1" with "read, share, delete" permissions + And user "user1" has logged in using the webUI + When the user browses to the folder "simple-folder (2)" on the files page + And the user shares folder "simple-empty-folder" with user "User Three" as "Advanced permissions" with permissions "share, delete, update" using the webUI + Then the error message with header "Error while sharing." should be displayed on the webUI + And as "user3" folder "simple-empty-folder (2)" should not exist + + Scenario: User is not allowed to update permissions of a reshared sub-folder to higher permissions than what user has received + Given user "user3" has been created with default attributes + And user "user2" has shared folder "simple-folder" with user "user1" with "read, share, delete, update" permissions + And user "user1" has shared folder "simple-folder (2)" with user "user3" with "share, delete" permissions + And user "user1" has logged in using the webUI + When the user browses to the folder "simple-folder (2)" on the files page + And the user shares folder "simple-empty-folder" with user "User Three" as "Advanced permissions" with permissions "share, delete, update, create" using the webUI + Then the error message with header "Error while sharing." should be displayed on the webUI + And as "user3" folder "simple-empty-folder (2)" should not exist + + Scenario: User is allowed to update permissions of a reshared sub-folder within the permissions that the user has received + Given user "user3" has been created with default attributes + And user "user2" has shared folder "simple-folder" with user "user1" with "all" permissions + And user "user1" has shared folder "simple-folder (2)" with user "user3" with "share, delete" permissions + And user "user1" has logged in using the webUI + When the user browses to the folder "simple-folder (2)" on the files page + And the user shares folder "simple-empty-folder" with user "User Three" as "Advanced permissions" with permissions "share, delete, create, update" using the webUI + Then user "user3" should have received a share with these details: + | field | value | + | uid_owner | user1 | + | share_with | user3 | + | file_target | /simple-empty-folder (2) | + | item_type | folder | + | permissions | all | diff --git a/tests/acceptance/features/webUISharingPermissionToRoot/sharedFolderWithMultipleUsersAdvancedPermissions.feature b/tests/acceptance/features/webUISharingPermissionToRoot/sharedFolderWithMultipleUsersAdvancedPermissions.feature new file mode 100644 index 00000000000..4754c8c9c18 --- /dev/null +++ b/tests/acceptance/features/webUISharingPermissionToRoot/sharedFolderWithMultipleUsersAdvancedPermissions.feature @@ -0,0 +1,66 @@ +@skipOnOCIS +Feature: Sharing folders with multiple internal users using advanced permissions + As a user + I want to set advanced permissions on shared folders with other users + So that I can control the access on those folders by other collaborators + + Background: + Given these users have been created with default attributes: + | username | + | user1 | + | user2 | + + Scenario Outline: share a folder with multiple users using role as advanced permissions role and different extra permissions + Given these users have been created with default attributes: + | username | + | user0 | + | user3 | + | user4 | + And user "user1" has logged in using the webUI + When the user opens the share dialog for folder "simple-folder" using the webUI + And the user opens the share creation dialog in the webUI + And the user selects the following collaborators for the share as "" with "" permissions: + | collaborator | type | + | Regular User | user | + | User Two | user | + | User Three | user | + | User Four | user | + And the user removes "User Four" as a collaborator from the share + And the user removes "Regular User" as a collaborator from the share + And the user shares with the selected collaborators + Then custom permissions "" should be set for user "User Two" for folder "simple-folder" on the webUI + And custom permissions "" should be set for user "User Three" for folder "simple-folder" on the webUI + And user "User Two" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI + And user "User Three" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI + And user "user2" should have received a share with these details: + | field | value | + | uid_owner | user1 | + | share_with | user2 | + | file_target | /simple-folder (2) | + | item_type | folder | + | permissions | | + And user "user3" should have received a share with these details: + | field | value | + | uid_owner | user1 | + | share_with | user3 | + | file_target | /simple-folder (2) | + | item_type | folder | + | permissions | | + But user "Regular User" should not be listed in the collaborators list on the webUI + And as "user0" folder "simple-folder (2)" should not exist + And user "User Four" should not be listed in the collaborators list on the webUI + And as "user4" folder "simple-folder (2)" should not exist + Examples: + | role | displayed-role | extra-permissions | displayed-permissions | actual-permissions | + # | Advanced permissions | Advanced permissions | delete | delete | read, delete | + # | Advanced permissions | Advanced permissions | update | update | read, update | + # | Advanced permissions | Advanced permissions | create | create | read, create | + # | Advanced permissions | Advanced permissions | share, delete | share, delete | read, share, delete | + # | Advanced permissions | Advanced permissions | share, update | share, update | read, update, share | + # | Advanced permissions | Advanced permissions | share, create | share, create | read, share, create | + # | Advanced permissions | Advanced permissions | delete, update | delete, update | read, delete, update | + # | Advanced permissions | Advanced permissions | delete, create | delete, create | read, delete, create | + # | Advanced permissions | Advanced permissions | update, create | update, create | read, update, create | + # | Advanced permissions | Advanced permissions | share, delete, update | share, delete, update | read, share, delete, update | + # | Advanced permissions | Advanced permissions | share, create, delete | share, create, delete | read, share, delete, create | + | Advanced permissions | Advanced permissions | share, update, create | share, update, create | read, share, update, create | diff --git a/tests/acceptance/features/webUISharingPermissionsUsers/sharePermissionsUsers.feature b/tests/acceptance/features/webUISharingPermissionsUsers/sharePermissionsUsers.feature index 198dfeed055..924b012aa30 100644 --- a/tests/acceptance/features/webUISharingPermissionsUsers/sharePermissionsUsers.feature +++ b/tests/acceptance/features/webUISharingPermissionsUsers/sharePermissionsUsers.feature @@ -5,13 +5,16 @@ Feature: Sharing files and folders with internal users with different permission So that I can control the access on those files/folders by other collaborators Background: - Given these users have been created with default attributes: + Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" + And the administrator has set the default folder for received shares to "Shares" + And these users have been created with default attributes: | username | | user1 | | user2 | Scenario: Change permissions of the previously shared folder Given user "user2" has shared folder "simple-folder" with user "user1" with "read" permissions + And user "user1" has accepted the share "simple-folder" offered by user "user2" And user "user2" has logged in using the webUI Then no custom permissions should be set for collaborator "User One" for folder "simple-folder" on the webUI When the user sets custom permission for current role of collaborator "User One" for folder "simple-folder" to "share" using the webUI @@ -20,13 +23,14 @@ Feature: Sharing files and folders with internal users with different permission | field | value | | uid_owner | user2 | | share_with | user1 | - | file_target | /simple-folder (2) | + | file_target | /Shares/simple-folder | | item_type | folder | | permissions | read, share | @issue-1853 Scenario: Change permissions of the previously shared folder Given user "user2" has shared folder "simple-folder" with user "user1" with "read, share, create, delete" permissions + And user "user1" has accepted the share "simple-folder" offered by user "user2" And user "user2" has logged in using the webUI Then custom permissions "share, create, delete" should be set for user "User One" for folder "simple-folder" on the webUI When the user sets custom permission for current role of collaborator "User One" for folder "simple-folder" to "create, delete, share" using the webUI @@ -35,13 +39,14 @@ Feature: Sharing files and folders with internal users with different permission | field | value | | uid_owner | user2 | | share_with | user1 | - | file_target | /simple-folder (2) | + | file_target | /Shares/simple-folder | | item_type | folder | | permissions | read, share, create, delete | @issue-1853 Scenario: Change permissions of the previously shared folder Given user "user2" has shared folder "simple-folder" with user "user1" with "read, share, create" permissions + And user "user1" has accepted the share "simple-folder" offered by user "user2" And user "user2" has logged in using the webUI Then custom permissions "share, create" should be set for user "User One" for folder "simple-folder" on the webUI When the user sets custom permission for current role of collaborator "User One" for folder "simple-folder" to "delete, update" using the webUI @@ -50,12 +55,13 @@ Feature: Sharing files and folders with internal users with different permission | field | value | | uid_owner | user2 | | share_with | user1 | - | file_target | /simple-folder (2) | + | file_target | /Shares/simple-folder | | item_type | folder | | permissions | read, update, delete | Scenario: Change permissions of the previously shared folder Given user "user2" has shared folder "simple-folder" with user "user1" with "read, delete" permissions + And user "user1" has accepted the share "simple-folder" offered by user "user2" And user "user2" has logged in using the webUI Then custom permissions "delete" should be set for user "User One" for folder "simple-folder" on the webUI When the user sets custom permission for current role of collaborator "User One" for folder "simple-folder" to "create, share" using the webUI @@ -64,20 +70,21 @@ Feature: Sharing files and folders with internal users with different permission | field | value | | uid_owner | user2 | | share_with | user1 | - | file_target | /simple-folder (2) | + | file_target | /Shares/simple-folder | | item_type | folder | | permissions | read, create, share | Scenario Outline: share a folder with another internal user assigning a role and the permissions Given user "user2" has logged in using the webUI When the user shares folder "simple-folder" with user "User One" as "" with permissions "" using the webUI + And user "user1" accepts the share "simple-folder" offered by user "user2" using the sharing API Then user "User One" should be listed as "" in the collaborators list for folder "simple-folder" on the webUI And custom permissions "" should be set for user "User One" for folder "simple-folder" on the webUI - And user "user1" should have received a share with these details: + Then user "user1" should have received a share with these details: | field | value | | uid_owner | user2 | | share_with | user1 | - | file_target | /simple-folder (2) | + | file_target | /Shares/simple-folder | | item_type | folder | | permissions | | Examples: @@ -90,6 +97,7 @@ Feature: Sharing files and folders with internal users with different permission Scenario Outline: Change permissions of the previously shared file Given user "user2" has shared file "lorem.txt" with user "user1" with "" permissions + And user "user1" has accepted the share "lorem.txt" offered by user "user2" And user "user2" has logged in using the webUI Then no custom permissions should be set for collaborator "User One" for file "lorem.txt" on the webUI When the user sets custom permission for current role of collaborator "User One" for file "lorem.txt" to "share" using the webUI @@ -98,7 +106,7 @@ Feature: Sharing files and folders with internal users with different permission | field | value | | uid_owner | user2 | | share_with | user1 | - | file_target | /lorem (2).txt | + | file_target | /Shares/lorem.txt | | item_type | file | | permissions | | Examples: @@ -108,6 +116,7 @@ Feature: Sharing files and folders with internal users with different permission Scenario: Delete all custom permissions of the previously shared file Given user "user2" has shared file "lorem.txt" with user "user1" with "read, share" permissions + And user "user1" has accepted the share "lorem.txt" offered by user "user2" And user "user2" has logged in using the webUI Then custom permissions "share" should be set for user "User One" for file "lorem.txt" on the webUI When the user disables all the custom permissions of collaborator "User One" for file "lorem.txt" using the webUI @@ -116,20 +125,21 @@ Feature: Sharing files and folders with internal users with different permission | field | value | | uid_owner | user2 | | share_with | user1 | - | file_target | /lorem (2).txt | + | file_target | /Shares/lorem.txt | | item_type | file | | permissions | read | Scenario Outline: share a file with another internal user assigning a role and the permissions Given user "user2" has logged in using the webUI When the user shares file "lorem.txt" with user "User One" as "" with permissions "" using the webUI + And user "user1" accepts the share "lorem.txt" offered by user "user2" using the sharing API Then user "User One" should be listed as "" in the collaborators list for file "lorem.txt" on the webUI And custom permissions "" should be set for user "User One" for file "lorem.txt" on the webUI - And user "user1" should have received a share with these details: + Then user "user1" should have received a share with these details: | field | value | | uid_owner | user2 | | share_with | user1 | - | file_target | /lorem (2).txt | + | file_target | /Shares/lorem.txt | | item_type | file | | permissions | | Examples: @@ -140,6 +150,7 @@ Feature: Sharing files and folders with internal users with different permission Scenario: Share a folder without share permissions using API and check if it is listed on the collaborators list for original owner Given user "user2" has shared folder "simple-folder" with user "user1" with "read" permissions + And user "user1" has accepted the share "simple-folder" offered by user "user2" And user "user2" has logged in using the webUI When the user opens the share dialog for folder "simple-folder" using the webUI Then user "User One" should be listed as "Viewer" in the collaborators list for folder "simple-folder" on the webUI @@ -148,7 +159,9 @@ Feature: Sharing files and folders with internal users with different permission Scenario: Resource owner upgrades share permissions of a re-share Given user "user3" has been created with default attributes And user "user2" has shared folder "simple-folder" with user "user1" with "read, share, delete" permissions - And user "user1" has shared folder "simple-folder (2)" with user "user3" with "read, delete" permissions + And user "user1" has accepted the share "simple-folder" offered by user "user2" + And user "user1" has shared folder "/Shares/simple-folder" with user "user3" with "read, delete" permissions + And user "user3" has accepted the share "simple-folder" offered by user "user1" And user "user2" has logged in using the webUI When the user sets custom permission for current role of collaborator "User Three" for folder "simple-folder" to "delete, update" using the webUI Then custom permissions "delete, update" should be set for user "User Three" for folder "simple-folder" on the webUI @@ -156,40 +169,49 @@ Feature: Sharing files and folders with internal users with different permission | field | value | | uid_owner | user1 | | share_with | user3 | - | file_target | /simple-folder (2) | + | file_target | /Shares/simple-folder | | item_type | folder | | permissions | delete, read, update | Scenario: User is not allowed to reshare sub-folder with more permissions Given user "user3" has been created with default attributes And user "user2" has shared folder "simple-folder" with user "user1" with "read, share, delete" permissions + And user "user1" has accepted the share "simple-folder" offered by user "user2" And user "user1" has logged in using the webUI - When the user browses to the folder "simple-folder (2)" on the files page + When the user opens folder "Shares" using the webUI + And the user opens folder "simple-folder" using the webUI And the user shares folder "simple-empty-folder" with user "User Three" as "Advanced permissions" with permissions "share, delete, update" using the webUI Then the error message with header "Error while sharing." should be displayed on the webUI - And as "user3" folder "simple-empty-folder (2)" should not exist + And user "user3" should not have received any shares + And as "user3" folder "/Shares/simple-empty-folder" should not exist Scenario: User is not allowed to update permissions of a reshared sub-folder to higher permissions than what user has received Given user "user3" has been created with default attributes And user "user2" has shared folder "simple-folder" with user "user1" with "read, share, delete, update" permissions - And user "user1" has shared folder "simple-folder (2)" with user "user3" with "share, delete" permissions + And user "user1" has accepted the share "simple-folder" offered by user "user2" + And user "user1" has shared folder "/Shares/simple-folder" with user "user3" with "share, delete" permissions And user "user1" has logged in using the webUI - When the user browses to the folder "simple-folder (2)" on the files page + When the user opens folder "Shares" using the webUI + And the user opens folder "simple-folder" using the webUI And the user shares folder "simple-empty-folder" with user "User Three" as "Advanced permissions" with permissions "share, delete, update, create" using the webUI Then the error message with header "Error while sharing." should be displayed on the webUI - And as "user3" folder "simple-empty-folder (2)" should not exist + And user "user3" should not have received any shares + And as "user3" folder "/Shares/simple-empty-folder" should not exist Scenario: User is allowed to update permissions of a reshared sub-folder within the permissions that the user has received Given user "user3" has been created with default attributes And user "user2" has shared folder "simple-folder" with user "user1" with "all" permissions - And user "user1" has shared folder "simple-folder (2)" with user "user3" with "share, delete" permissions + And user "user1" has accepted the share "simple-folder" offered by user "user2" + And user "user1" has shared folder "/Shares/simple-folder" with user "user3" with "share, delete" permissions And user "user1" has logged in using the webUI - When the user browses to the folder "simple-folder (2)" on the files page + When the user opens folder "Shares" using the webUI + And the user browses to the folder "simple-folder" on the files page And the user shares folder "simple-empty-folder" with user "User Three" as "Advanced permissions" with permissions "share, delete, create, update" using the webUI + And user "user3" accepts the share "simple-folder/simple-empty-folder" offered by user "user1" using the sharing API Then user "user3" should have received a share with these details: | field | value | | uid_owner | user1 | | share_with | user3 | - | file_target | /simple-empty-folder (2) | + | file_target | /Shares/simple-empty-folder | | item_type | folder | | permissions | all |