Unify API responses when setting permissions for public links#39194
Unify API responses when setting permissions for public links#39194jvillafanez merged 3 commits intomasterfrom
Conversation
|
💥 Acceptance tests pipeline apiSharePublicLink2-mariadb10.2-php7.4 failed. The build has been cancelled. |
|
Kudos, SonarCloud Quality Gate passed! |
|
Code-wise it looks fine, but I'm still a bit unsure with the change of the behavior for the public uploads. |
tests/acceptance/features/apiSharePublicLink1/createPublicLinkShare.feature
Show resolved
Hide resolved
tests/acceptance/features/apiSharePublicLink1/createPublicLinkShare.feature
Show resolved
Hide resolved
tests/acceptance/features/apiSharePublicLink1/createPublicLinkShare.feature
Show resolved
Hide resolved
tests/acceptance/features/apiSharePublicLink1/createPublicLinkShare.feature
Show resolved
Hide resolved
|
I added a before & after-table in the first comment of this PR. Although some return codes still seem kinda random, it's much more streamlined with this "fix". @pmaier1 @micbar When public share uploads are not allowed via config, I would expect an API request with create permissions to return a forbidden response. That goes for the create permissions alone, but also for combinations like read+create+update. Is my assumption correct? |
|
Now that 10.9 is out, I'd like to catch up on this again. @pmaier1 What do you think about it? To summarize it: The API responses when creating/editing public links are kinda random at the moment. Like for example when public uploading is forbidden, creating a link with the permissions Assuming the clients are fine with it (which I will re-test), I think it would be good to streamline that. |
|
It will be nice to get this more consistent. I expect (hope) that some API test combinations will fail and need to be adjusted to match the changed responses. |
22ee62f to
96853ec
Compare
|
Kudos, SonarCloud Quality Gate passed! |
I adjusted some acceptance test scenarios to work with the new response code, pipeline seems to be fine with it now. |
|
@mmattel in case there are docs to be updated. |
|
Confirmed fixed in 10.10.0 RC2 When Sharing settings are without "Allow public uploads"
|








Description
Setting (and changing) the permissions of public links via the OCS API will now return proper and unified API responses. Adding create permissions while public uploading is disabled globally will always return a 403 response.
Before & after changes
The following table shows the changes before and after this PR. The rows highlighted in bold are the scenarios which now return a different response.
public uploads allowedpublic uploads not allowedRelated Issue
How Has This Been Tested?
See reproduction steps in the above mentioned tickets.
Types of changes
Checklist: