Skip to content

Viewer cannot share a shared resource #2260

Closed

Description

@kiranparajuli589

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.

Details

OCIS_VERSION=git
BRANCH=latest master
STORAGE_FRONTEND_UPLOAD_DISABLE_TUS=false

Additional context

Add any other context about the problem here.

Activity

  1. kiranparajuli589 commented on Jul 5, 2021

    @kiranparajuli589
    ContributorAuthor

    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: ''
        }
      }
    }
    

  2. phil-davis commented on Jul 5, 2021

    @phil-davis
    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"

  3. kiranparajuli589 commented on Jun 17, 2022

    @kiranparajuli589
    ContributorAuthor

    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)

  4. kiranparajuli589 commented on Jun 17, 2022

    @kiranparajuli589
    ContributorAuthor

    QA-Team Todo:

    • find the bug demonstration scenarios and remove them
    • unskip the actual scenario for ocis environment.
  5. self-assigned this
    on Jun 21, 2022
  6. grgprarup commented on Jun 24, 2022

    @grgprarup
    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.

  7. removed their assignment
    on Jul 8, 2022
  8. SwikritiT commented on Jul 8, 2022

    @SwikritiT
    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.

  9. SwikritiT commented on Jul 8, 2022

    @SwikritiT
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions