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

Viewer cannot share a shared resource #2260

Closed
kiranparajuli589 opened this issue Jul 5, 2021 · 7 comments
Closed

Viewer cannot share a shared resource #2260

kiranparajuli589 opened this issue Jul 5, 2021 · 7 comments
Labels

Comments

@kiranparajuli589
Copy link
Contributor

Describe the bug

ocis roles are not similar to oc10

Steps to reproduce

Steps to reproduce the behavior:

  1. create two users uu1 and uu2
  2. upload a file lorem.txt using user uu1
  3. share lorem.txt with use uu2 using user uu1
  4. login as user uu2
  5. accept the latest incoming share from user uu1 for lorem.txt
  6. try to share lorem.txt using user uu2

Expected behavior

with oc10 backend

  • share is created with permissions: 17
  • viewer can share the shared resource with other users/groups

Actual behavior

with ocis backend,

  • share is created with permissions 1
  • viewer do not have permission to share
  • with editor role, editor can share the shared resource

Screenshots

Role Dropdown for ocis frontend:
Screenshot from 2021-07-05 14-44-47
Role Dropdown for oc10-web frontend:
Screenshot from 2021-07-05 14-44-59

Setup

Please describe how you started the server and provide a list of relevant environment variables.

OCIS_VERSION=git
BRANCH=latest master
STORAGE_FRONTEND_UPLOAD_DISABLE_TUS=false

Additional context

Add any other context about the problem here.

@kiranparajuli589
Copy link
Contributor Author

kiranparajuli589 commented Jul 5, 2021

Also, with ocis backend:

Share permission is not available in oCIS WebUI so when setting all permissions, it is displayed as "Advanced permissions"

when a share is created with the following params:

'path' => '/lorem.txt',
'shareWith' => 'Carol',
'shareType' => '0',
'permissions' => '31'

share is created with permission 19

Response

{
  ocs: {
    meta: { status: 'ok', statuscode: 200, message: 'OK' },
    data: {
      id: 'b2b8799f-d554-44f6-af7c-1b641b92166b',
      share_type: 0,
      uid_owner: 'Alice',
      displayname_owner: 'Alice Hansen',
      additional_info_owner: '[email protected]',
      permissions: 19,
      stime: 1625477023,
      parent: '',
      expiration: '',
      token: '',
      uid_file_owner: 'Alice',
      displayname_file_owner: 'Alice Hansen',
      additional_info_file_owner: '[email protected]',
      state: 0,
      path: '/lorem.txt',
      item_type: 'file',
      mimetype: 'text/plain',
      storage_id: '1284d238-aa92-42ce-bdc4-0b0000009157!0586653e-7778-43c0-a179-2d70f9835d62',
      storage: 0,
      item_source: 'MTI4NGQyMzgtYWE5Mi00MmNlLWJkYzQtMGIwMDAwMDA5MTU3OjA1ODY2NTNlLTc3NzgtNDNjMC1hMTc5LTJkNzBmOTgzNWQ2Mg==',
      file_source: 'MTI4NGQyMzgtYWE5Mi00MmNlLWJkYzQtMGIwMDAwMDA5MTU3OjA1ODY2NTNlLTc3NzgtNDNjMC1hMTc5LTJkNzBmOTgzNWQ2Mg==',
      file_parent: '',
      file_target: '/lorem.txt',
      share_with: 'Carol',
      share_with_displayname: 'Carol King',
      share_with_additional_info: '[email protected]',
      mail_send: 0,
      name: ''
    }
  }
}

@phil-davis
Copy link
Contributor

share is created with permission 19

That is what happens in oC10: https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareManagementBasicToRoot/createShareToRootFolder.feature#L83

"# Ask for full permissions. You get share plus read plus update. create and delete do not apply to shares of a file"

@kiranparajuli589
Copy link
Contributor Author

kiranparajuli589 commented Jun 17, 2022

UPDATE
At the date of the comment, following the steps from the issue description:

  • uu2 can share the received share with other users/groups
  • share is created with permission 17 (now similar to oc10)

we can see the bug demonstration failing here at owncloud/web#7136 (comment)

@kiranparajuli589
Copy link
Contributor Author

kiranparajuli589 commented Jun 17, 2022

QA-Team Todo:

  • find the bug demonstration scenarios and remove them
  • unskip the actual scenario for ocis environment.

Sorry, something went wrong.

@grgprarup
Copy link
Contributor

This issue is blocked for now due to other related issues of resharing shared resources on the web with OCIS backend. owncloud/web#7179
This owncloud/web#7086 is the PR related to resharing on web+ocis.

@grgprarup grgprarup assigned grgprarup and unassigned grgprarup Jun 24, 2022
@grgprarup grgprarup removed their assignment Jul 8, 2022
@SwikritiT
Copy link
Contributor

Resharing is now available in ocis and it can be configured in UI through variable FRONTEND_ENABLE_RESHARING: "true". Depending on if this variable is set or not the share permission is available in UI so closing. There will be a follow-up PR to remove the linked tests from expected failure.

@SwikritiT
Copy link
Contributor

Follow-up PR here: owncloud/web#7246

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants