@@ -166,3 +166,83 @@ Feature: app-files-sharing-link
166166 And I authenticate with password "abcdef"
167167 # download starts no page redirection
168168 And I see that the current page is the Authenticate page for the direct download shared link I wrote down
169+
170+ Scenario : sharee can not reshare by link if resharing is disabled in the settings after the share is created
171+ Given I act as John
172+ And I am logged in as the admin
173+ And I act as Jane
174+ And I am logged in
175+ And I act as John
176+ And I rename "welcome.txt" to "farewell.txt"
177+ And I see that the file list contains a file named "farewell.txt"
178+ And I share "farewell.txt" with "user0"
179+ And I see that the file is shared with "user0"
180+ And I visit the settings page
181+ And I open the "Sharing" section of the "Administration" group
182+ And I disable resharing
183+ And I see that resharing is disabled
184+ When I act as Jane
185+ # The Files app is open again to reload the file list
186+ And I open the Files app
187+ Then I see that the file list contains a file named "farewell.txt"
188+ And I open the details view for "farewell.txt"
189+ And I see that the details view is open
190+ And I open the "Sharing" tab in the details view
191+ And I see that the "Sharing" tab in the details view is eventually loaded
192+ And I see that the file is shared with me by "admin"
193+ And I see that resharing the file by link is not available
194+
195+ Scenario : sharee can unshare a reshare by link if resharing is disabled in the settings after the reshare is created
196+ Given I act as John
197+ And I am logged in as the admin
198+ And I act as Jane
199+ And I am logged in
200+ And I act as John
201+ And I rename "welcome.txt" to "farewell.txt"
202+ And I see that the file list contains a file named "farewell.txt"
203+ And I share "farewell.txt" with "user0"
204+ And I see that the file is shared with "user0"
205+ And I act as Jane
206+ # The Files app is open again to reload the file list
207+ And I open the Files app
208+ And I share the link for "farewell.txt"
209+ And I write down the shared link
210+ And I act as John
211+ And I visit the settings page
212+ And I open the "Sharing" section of the "Administration" group
213+ And I disable resharing
214+ And I see that resharing is disabled
215+ When I act as Jane
216+ # The Files app is open again to reload the file list
217+ And I open the Files app
218+ And I open the details view for "farewell.txt"
219+ And I see that the details view is open
220+ And I open the "Sharing" tab in the details view
221+ And I see that the "Sharing" tab in the details view is eventually loaded
222+ And I unshare the link share
223+ Then I see that resharing the file by link is not available
224+
225+ Scenario : reshare by link can be accessed if resharing is disabled in the settings after the reshare is created
226+ Given I act as John
227+ And I am logged in as the admin
228+ And I act as Jane
229+ And I am logged in
230+ And I act as John
231+ And I rename "welcome.txt" to "farewell.txt"
232+ And I see that the file list contains a file named "farewell.txt"
233+ And I share "farewell.txt" with "user0"
234+ And I see that the file is shared with "user0"
235+ And I act as Jane
236+ # The Files app is open again to reload the file list
237+ And I open the Files app
238+ And I share the link for "farewell.txt"
239+ And I write down the shared link
240+ And I act as John
241+ And I visit the settings page
242+ And I open the "Sharing" section of the "Administration" group
243+ And I disable resharing
244+ And I see that resharing is disabled
245+ When I act as Jim
246+ And I visit the shared link I wrote down
247+ Then I see that the current page is the shared link I wrote down
248+ And I see that the shared file preview shows the text "Welcome to your Nextcloud account!"
0 commit comments