-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Added tests about permissions and public upload #26639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
60451fa
e05c004
dad998c
2ba0f9a
1b3984c
3358c2b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -976,3 +976,118 @@ Feature: sharing | |
| Then etag of element "/" of user "user1" has changed | ||
| And etag of element "/PARENT" of user "user0" has not changed | ||
|
|
||
| Scenario: Increasing permissions is allowed for owner | ||
| Given As an "admin" | ||
| And user "user0" exists | ||
| And user "user1" exists | ||
| And group "new-group" exists | ||
| And user "user0" belongs to group "new-group" | ||
| And user "user1" belongs to group "new-group" | ||
| And Assure user "user0" is subadmin of group "new-group" | ||
| And As an "user0" | ||
| And folder "/FOLDER" of user "user0" is shared with group "new-group" | ||
| And Updating last share with | ||
| | permissions | 0 | | ||
| When Updating last share with | ||
| | permissions | 31 | | ||
| Then the OCS status code should be "100" | ||
| And the HTTP status code should be "200" | ||
|
|
||
| Scenario: Adding public upload to a read only shared folder as recipient is not allowed | ||
| Given As an "admin" | ||
| And user "user0" exists | ||
| And user "user1" exists | ||
| And As an "user0" | ||
| And user "user0" created a folder "/test" | ||
| And folder "/test" of user "user0" is shared with user "user1" with permissions 17 | ||
| And As an "user1" | ||
| And creating a share with | ||
| | path | /test | | ||
| | shareType | 3 | | ||
| | publicUpload | false | | ||
| When Updating last share with | ||
| | publicUpload | true | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks legitimate. At line 1002 the share is read-write so it's acceptable that the recipient can also make the link share read-write. Did you mean to make the local share read-only ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, you're right. I'll change it. |
||
| Then the OCS status code should be "404" | ||
| And the HTTP status code should be "200" | ||
|
|
||
| Scenario: Adding public upload to a shared folder as recipient is allowed with permissions | ||
| Given As an "admin" | ||
| And user "user0" exists | ||
| And user "user1" exists | ||
| And As an "user0" | ||
| And user "user0" created a folder "/test" | ||
| And folder "/test" of user "user0" is shared with user "user1" with permissions 31 | ||
| And As an "user1" | ||
| And creating a share with | ||
| | path | /test | | ||
| | shareType | 3 | | ||
| | publicUpload | false | | ||
| When Updating last share with | ||
| | publicUpload | true | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we also have the same tests with the "permissions" attribute ? @SergioBertolinSG
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure. |
||
| Then the OCS status code should be "100" | ||
| And the HTTP status code should be "200" | ||
|
|
||
| Scenario: Adding public upload to a read only shared folder as recipient is not allowed | ||
| Given As an "admin" | ||
| And user "user0" exists | ||
| And user "user1" exists | ||
| And As an "user0" | ||
| And user "user0" created a folder "/test" | ||
| And folder "/test" of user "user0" is shared with user "user1" with permissions 17 | ||
| And As an "user1" | ||
| And creating a share with | ||
| | path | /test | | ||
| | shareType | 3 | | ||
| | permissions | 1 | | ||
| When Updating last share with | ||
| | permissions | 15 | | ||
| Then the OCS status code should be "404" | ||
| And the HTTP status code should be "200" | ||
|
|
||
| Scenario: Adding public upload to a shared folder as recipient is allowed with permissions | ||
| Given As an "admin" | ||
| And user "user0" exists | ||
| And user "user1" exists | ||
| And As an "user0" | ||
| And user "user0" created a folder "/test" | ||
| And folder "/test" of user "user0" is shared with user "user1" with permissions 31 | ||
| And As an "user1" | ||
| And creating a share with | ||
| | path | /test | | ||
| | shareType | 3 | | ||
| | permissions | 1 | | ||
| When Updating last share with | ||
| | permissions | 15 | | ||
| Then the OCS status code should be "100" | ||
| And the HTTP status code should be "200" | ||
|
|
||
| Scenario: resharing using a public link with read only permissions is not allowed | ||
| Given As an "admin" | ||
| And user "user0" exists | ||
| And user "user1" exists | ||
| And As an "user0" | ||
| And user "user0" created a folder "/test" | ||
| And folder "/test" of user "user0" is shared with user "user1" with permissions 1 | ||
| And As an "user1" | ||
| And creating a share with | ||
| | path | /test | | ||
| | shareType | 3 | | ||
| | publicUpload | false | | ||
| Then the OCS status code should be "404" | ||
| And the HTTP status code should be "200" | ||
|
|
||
| Scenario: resharing using a public link with read and write permissions only is not allowed | ||
| Given As an "admin" | ||
| And user "user0" exists | ||
| And user "user1" exists | ||
| And As an "user0" | ||
| And user "user0" created a folder "/test" | ||
| And folder "/test" of user "user0" is shared with user "user1" with permissions 15 | ||
| And As an "user1" | ||
| And creating a share with | ||
| | path | /test | | ||
| | shareType | 3 | | ||
| | publicUpload | false | | ||
| Then the OCS status code should be "404" | ||
| And the HTTP status code should be "200" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
subadmin really needed ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps not, it comes from here #25542 (comment)