Skip to content
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

only get the permissions from the share source if it's not already cached #22744

Merged
merged 1 commit into from
Sep 10, 2020

Conversation

icewind1991
Copy link
Member

this prevents having to setup the share source when doing metadata stuff on the share root

Signed-off-by: Robin Appelman robin@icewind.nl

…ched

this prevents having to setup the share source when doing metadata stuff on the share root

Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Sep 9, 2020
@icewind1991 icewind1991 added this to the Nextcloud 20 milestone Sep 9, 2020
Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the trick for me!

@rullzer rullzer mentioned this pull request Sep 9, 2020
13 tasks
Copy link
Member

@juliushaertl juliushaertl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense 👍

@juliushaertl
Copy link
Member

Never seen this failure so far, so might be worth to trigger CI again to see if it is a temporary one:

    tests/acceptance/features/app-files.feature:108

Show full log

  Scenario: show shares                                               # /drone/src/tests/acceptance/features/app-files.feature:108
    Given I am logged in                                              # LoginPageContext::iAmLoggedIn()
    And I share the link for "welcome.txt"                            # FilesAppSharingContext::iShareTheLinkFor()
    When I open the "Shares" section                                  # AppNavigationContext::iOpenTheSection()
    Then I see that the current section is "Shares"                   # AppNavigationContext::iSeeThatTheCurrentSectionIs()
    Then I see that the file list contains a file named "welcome.txt" # FileListContext::iSeeThatTheFileListContainsAFileNamed()
      Row for file welcome.txt in file list could not be found after 100 seconds (NoSuchElementException)

@MorrisJobke MorrisJobke added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Sep 10, 2020
@faily-bot
Copy link

faily-bot bot commented Sep 10, 2020

🤖 beep boop beep 🤖

Here are the logs for the failed build:

Status of 32919: failure

mysql5.6-php7.2

Show full log
There were 2 warnings:

1) Test\Files\ViewTest::testRenameFailDeleteTargetKeepSource
Trying to configure method "writeStream" which cannot be configured because it does not exist, has not been specified, is final, or is static

2) Test\Files\ViewTest::testCopyFailDeleteTargetKeepSource
Trying to configure method "writeStream" which cannot be configured because it does not exist, has not been specified, is final, or is static

--

There was 1 failure:

1) Test\Files\ObjectStore\ObjectStoreStorageTest::testCopyFromSameStorage with data set #4 ('/source.txt', '/tärgét.txt')
Expected /tärgét.txt to be a copy of /drone/src/tests/data/lorem.txt
Failed asserting that false matches expected 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\n
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'.

/drone/src/tests/lib/Files/Storage/Storage.php:222
/drone/src/tests/lib/Files/Storage/Storage.php:600

acceptance-app-files-sharing

  • tests/acceptance/features/app-files-sharing.feature:338
Show full log
  Scenario: sharee can revoke create permission from reshare after the sharer disabled it # /drone/src/tests/acceptance/features/app-files-sharing.feature:338
    Given I act as John                                                                   # ActorContext::iActAs()
    And I am logged in as the admin                                                       # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I act as Jane                                                                     # ActorContext::iActAs()
    And I am logged in                                                                    # LoginPageContext::iAmLoggedIn()
    And I act as Jim                                                                      # ActorContext::iActAs()
    And I am logged in as "user1"                                                         # LoginPageContext::iAmLoggedInAs()
    And I act as John                                                                     # ActorContext::iActAs()
    And I create a new folder named "Shared folder"                                       # FileListContext::iCreateANewFolderNamed()
    And I see that the file list contains a file named "Shared folder"                    # FileListContext::iSeeThatTheFileListContainsAFileNamed()
    And I share "Shared folder" with "user0"                                              # FilesAppSharingContext::iShareWith()
    And I see that the file is shared with "user0"                                        # FilesAppSharingContext::iSeeThatTheFileIsSharedWith()
    And I act as Jane                                                                     # ActorContext::iActAs()
    And I open the Files app                                                              # FilesAppContext::iOpenTheFilesApp()
    And I share "Shared folder" with "user1"                                              # FilesAppSharingContext::iShareWith()
    And I see that the file is shared with "user1"                                        # FilesAppSharingContext::iSeeThatTheFileIsSharedWith()
    And I act as John                                                                     # ActorContext::iActAs()
    And I set the share with "user0" as not creatable                                     # FilesAppSharingContext::iSetTheShareWithAsNotCreatable()
    And I see that "user0" can not create in the share                                    # FilesAppSharingContext::iSeeThatCanNotCreateInTheShare()
    And I act as Jim                                                                      # ActorContext::iActAs()
    And I open the Files app                                                              # FilesAppContext::iOpenTheFilesApp()
    And I enter in the folder named "Shared folder"                                       # FileListContext::iEnterInTheFolderNamed()
    And I create a new folder named "Subfolder"                                           # FileListContext::iCreateANewFolderNamed()
    And I see that the file list contains a file named "Subfolder"                        # FileListContext::iSeeThatTheFileListContainsAFileNamed()
    When I act as Jane                                                                    # ActorContext::iActAs()
    And I open the Files app                                                              # FilesAppContext::iOpenTheFilesApp()
    And I open the details view for "Shared folder"                                       # FileListContext::iOpenTheDetailsViewFor()
    And I see that the details view is open                                               # FilesAppContext::iSeeThatTheDetailsViewIsOpen()
    And I open the "Sharing" tab in the details view                                      # FilesAppContext::iOpenTheTabInTheDetailsView()
    And I see that the "Sharing" tab in the details view is eventually loaded             # FilesAppContext::iSeeThatTheTabInTheDetailsViewIsEventuallyLoaded()
    And I set the share with "user1" as not creatable                                     # FilesAppSharingContext::iSetTheShareWithAsNotCreatable()
    Then I see that "user1" can not create in the share                                   # FilesAppSharingContext::iSeeThatCanNotCreateInTheShare()
    And I see that "user1" can not be allowed to create in the share                      # FilesAppSharingContext::iSeeThatCanNotBeAllowedToCreateInTheShare()
    And I act as Jim                                                                      # ActorContext::iActAs()
    And I open the Files app                                                              # FilesAppContext::iOpenTheFilesApp()
    And I enter in the folder named "Shared folder"                                       # FileListContext::iEnterInTheFolderNamed()
    And I see that it is not possible to create new files                                 # FileListContext::iSeeThatItIsNotPossibleToCreateNewFiles()
      Failed asserting that true is false.

acceptance-login

  • tests/acceptance/features/login.feature:38
Show full log
  Scenario: log in with invalid user once fixed by admin              # /drone/src/tests/acceptance/features/login.feature:38
    Given I act as John                                               # ActorContext::iActAs()
    And I can not log in with user unknownUser and password 123456acb # LoginPageContext::iCanNotLogInWithUserAndPassword()
    When I act as Jane                                                # ActorContext::iActAs()
    And I am logged in as the admin                                   # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I open the User settings                                      # SettingsMenuContext::iOpenTheUserSettings()
    And I click the New user button                                   # UsersSettingsContext::iClickTheNewUserButton()
    And I see that the new user form is shown                         # UsersSettingsContext::iSeeThatTheNewUserFormIsShown()
    And I create user unknownUser with password 123456acb             # UsersSettingsContext::iCreateUserWithPassword()
    And I see that the list of users contains the user unknownUser    # UsersSettingsContext::iSeeThatTheListOfUsersContainsTheUser()
    And I act as John                                                 # ActorContext::iActAs()
    And I log in with user unknownUser and password 123456acb         # LoginPageContext::iLogInWithUserAndPassword()
    Then I see that the current page is the Files app                 # FilesAppContext::iSeeThatTheCurrentPageIsTheFilesApp()
      Failed asserting that 'http://acceptance-login/index.php/login?user=unknownUser' starts with "http://acceptance-login/index.php/apps/files/".

@MorrisJobke MorrisJobke merged commit 42e2068 into master Sep 10, 2020
@MorrisJobke MorrisJobke deleted the shared-cached-permissions branch September 10, 2020 08:15
@rullzer
Copy link
Member

rullzer commented Sep 16, 2020

/backport to stable19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants