Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-82633

As a user I want to share a document or a media asset with another registered user or users

    Details

    • Type: Story
    • Status: Closed
    • Priority: Major
    • Resolution: Completed
    • Affects Version/s: None
    • Fix Version/s: Master
    • Component/s: Documents & Media
    • Labels:

      Description

      Real use case

      Jon works in the mortgages department. He, together with his team, works on completing all the necessary information to approve a loan. This means, collecting documents (proof of income, marriage certificate…) from the customer.. After all the information is processed, Jon generates one or more documents that needs to make available to the customer and her spouse. To do this with Liferay, Jon’s company IT people had to work on a workaround because permissions are role-based. So they are creating a custom “customer” role to be able to add the permissions to a subset of the document. With more than 10k customers, this is a no-go.

      Goal

      The goal of this user story is to enable Jon to share a document to a registered user in a easy way.

      Details

      When sharing a document or a media asset we should provide certain configuration to control how our document is going to be shared:

      • The document or asset can be shared to other users or not. Default: yes.

      Behavior considerations

      Incrementing access permissions: Read -> read and add comments -> update (and read) and add comments

      Who could share a document or asset? 

      • The owner can share it for reading or updating and add comments.
      • Anyone with read permissions will be able to share it just for reading
      • Anyone with read and add comments permissions will be able to share it for reading and add comments.
      • Anyone with update, read and add comments permissions will be able to share it for reading or updating and add comments.

      Can a user with reading and updating permissions (but not adding comments) share a document for updating?

      NO. For sharing a document to update, the user must have read, add comments and updating permissions. Why? We want to prevent corner cases and simplify the behavior.

      Can a user with just update permissions share the document for viewing?

      NO. Again, a user won't be able to share a document if the user does not have the view permissions first. 

      Can a user share a document for updating and not reading? 

      No, it won't be possible. If a file is shared for updating, the user will be able to read it too. So, share a file for updating implies reading too.

      Who can comment?

      If the user who shares a file has "add comment" permissions, the user will be able to enable comments when sharing a document.

      What happens if two users share the same file with a third user with different actions (view, comments, update)?

      The actions will be cumulative.

      If user1 shared the document with user2, can user2 delete the  document?

      No, he won't be able to do it. Only the owner (or any other role with deleting permissions) will be able to delete the document. 

      What happens if a user that shared a document or documents is deleted?

      If the document (or documents) is in the user site, the document will be deleted. If the document is in a shared site, the document won't be deleted.

      The admin user will be able to change sharing capabilities anytime.

      What happens if the permissions of a user that shared a document change?

      That won't affect to the persons who the document was shared with.

      Will a user be able to see who has access to the document by sharing?

      Only users with update permissions or those with whom the file was shared to update will be able to see this information.

      Acceptance Criteria

      • When a user selects a document or asset, the user will be able to share it to one or more users.
      • Before sharing a document or asset, the user should be able to configure sharing options (above) or leave them default.
      • The user with update permission should be able to see all the users with access to the document or asset.
      • The user with update permissions will be able to change access capabilities (even revoke access) to all the users the document was shared with.
      • The user should be able to see the documents and assets shared with him/her.

      UX work needed

      • Define the user sharing flow
      • Define how the user will be able to see users with access to the document or asset and revoke sharing.
      • Define how the user can see all the documents and assets shared with him/her
      • Inform the user that a document is shared (in the list, info panel... etc). Remember that we will need also to inform that a public link has been generated (other user story) and we could inform about it too.

      What could come next

      • Group sharing
      • Share through mentioning
      • Folder sharing

      User Experience

      Summary

      • Add the Share action in the contextual menu of each document
      • Add the Share button in the management toolbar
      • Add the Share button in the info panel
      • Reorder the actions in the management toolbar
      • Reorder the fields in the table view
      • Add the modal window for sharing
      • Add the new state of the Owner / Collaborators component when a file has been shared
      • Add a new section within the user accordion item in the Product Menu. User > My Account > My Documents and Media
      • Add a new nav tab bar called "Shared with me" in the "My Documents and Media" page

      Design

      Please follow the design described in Invision

      MODAL WINDOW
      Layout

      • Title: It's componed by: "Share #TitlteName"
      • Invite Input box with a label "Invite to collaborate", a hint "Enter name or email" and a help text "You can use the comma to enter collaborators"
      • A checkbox with the text: "Allow the document to be shared with other users"
      • Sharing Permission radio group: Section Label "SHARING PERMISSION" and with 3 radio buttons (Edition, Comments and View)
      • Edition help text: "Collaborators can view, comment, edit and update the document"
      • Comments help text: "Collaborators can view and comment on the document"
      • View help text: "Collaborators can only view the document"
      • Action buttons: Cancel (secondary) and Share (primary)

      INFO PANEL
      Layout

      • Owner / Collaborators component
      • Buttons: Download and Share (buttons with icons)

      TABLE VIEW
      Order of the fields

      1. Title
      2. Shared (new icon column field)
      3. Document Type
      4. Size
      5. Status
      6. Modified Date

      Interaction

      INVITE INPUT BOX

      • While a user is typing an email a panel is shown with a list of suggested users from the allowed scope (3 letters).
      • If the user selects a suggested user, that user is added in the input box as a user label.
      • If the two previous feature are not enabled or are not ready. The user can type normally and when he presses the Enter key, the mail will be converted in a mail label.
      • This mail label has a cross within to remove the item
      • If the user double clicks the mail label, the label is broken and the text appears as a normal input text.
      • Mail format validation is needed here.

      ALLOW SHARING CHECKBOX

      • The checkbox is checked by default

      SHARING PERMISSION RADIO GROUP

      • Edition radio button is checked by default

      OWNER / COLLABORATOR COMPONENT
      States
      1. Not Sharing

      • If the document has not been shared yet, the component only shows the Owner.

      2. Sharing

      • If the document has been shared previously, the component shows the Owner + a list of Collaborators

      • If the document has more than 5 collaborators, the last item changes into a Text Sticker showing "+#collaborators". It's the number of additional collaborators that are not been shown.

      • All these stickers have a tooltip showing a message:
        • Owner: "#OwnerName+Surname is the owner"
        • Collaborator: "#CollaboratorName+Surname has #permission permission"
        • Additional Collaborator: "#number collaborators more"

      TABLE VIEW

      • If the document has been shared the icon shared appears
      • The shared column has no header text
      • The shared column can be ordered so a new option "Shared" in the filter and order menu needs to be added. (LPS-92595)
      • The shared icon has a tooltip: "Shared"
      • If a user clicks the shared icon the infopanel is opened and the Collaborators view is shown (--LPS-83945--)

      SHARING

      • If a user clicks share in the modal window and the info panel is opened. The panel must keep opened (currently the panel collapses and the selection is lost. This is a common behavior in portal and it has been reported to lexicon as an interaction pattern to be reviewed)
      • When the document has been shared successfully a success alert is shown with the following message "Success: Document shared"

      • When the document has been shared successfully the Collaborators must be notified.
      • If a collaborator is trying to share a document, the Sharing Permission radio buttons will be disabled according the permissions of the collaborator (e.g. a collaborator with the view permission will see comments and edition radio buttons disabled and the view option disabled and selected)

      CORNER CASES

      • If a user shares a document with a user that had that document already shared previously, a success alert is shown with the following message "Success: Document shared”. The permissions of the document shared are overwritten and the notification flows are triggered normally.
      • If a user shares a document with himself, a success alert is shown with the following message “Success: Document shared“. Only the email notification is sent if it's enabled.
      • If a user changes the permissions of a document that has been shared while a collaborator is sharing it, an error alert is shown with the following message “Error: Permissions required”.
      • If something happens and doesn't have a described solution here, an error alert is shown with the following message “Error: Request failed”.

        Attachments

        1. modal.png
          modal.png
          107 kB
        2. My DM.png
          My DM.png
          54 kB
        3. Not Sharing.png
          Not Sharing.png
          9 kB
        4. Sharing.png
          Sharing.png
          23 kB
        5. Sharing with more.png
          Sharing with more.png
          20 kB
        6. Step 13.png
          Step 13.png
          94 kB

          Issue Links

          1.
          Create a service to track users sharing assets and permission LPS-83339 Technical Task Closed Brian Chan  
          2.
          Ensure that document library permission checks consider sharing LPS-83368 Technical Task Closed Brian Chan  
          3.
          Ensure that when a document is removed the sharing entries are removed as well LPS-83369 Technical Task Closed Brian Chan  
          4.
          Ensure that when a user is removed the sharing entries to that user are deleted LPS-83372 Technical Task Closed Brian Chan  
          5.
          Ensure that when a group is removed the sharing entries for that group are also removed LPS-83374 Technical Task Closed Brian Chan  
          6.
          Ensure that Document Library Search considers sharing permissions LPS-83563 Technical Task Closed Brian Chan  
          7.
          Ensure we check permission to share before sharing LPS-84523 Technical Task Closed Sergio Gonzalez (Inactive)  
          8.
          Add a new "Share" action in the contextual menu of documents LPS-84562 Technical Task Closed Sergio Gonzalez (Inactive)  
          9.
          Create service to update sharing permissions LPS-84567 Technical Task Closed Brian Chan  
          10.
          Include information about sharing in Info Panel LPS-84638 Technical Task Closed Brian Chan  
          11.
          Basic implementation of the sharing form to share documents with registered users via email LPS-84675 Technical Task Closed Brian Chan  
          12.
          Support sharing when doing inline permissioning check for Documents and Media file entries LPS-84682 Technical Task Closed Brian Chan  
          13.
          Wrong classname used for sharing permission checking LPS-84714 Technical Task Closed Brian Chan  
          14.
          Allow users sharing a document to decide whether those users can share the document or not LPS-84802 Technical Task Closed Brian Chan  
          15.
          Include missing taglib import LPS-84826 Technical Task Closed Brian Chan  
          16.
          Add client validation and manage back errors LPS-85342 Technical Task Closed Brian Chan  
          17.
          Refactoring SharingEntryAction to better naming and package LPS-85578 Technical Task Closed Brian Chan  

            Activity

              People

              Assignee:
              patricia.perez Patricia Perez
              Reporter:
              antonio.aragues Antonio Aragüés (Inactive)
              Recent user:
              Kiyoshi Lee
              Participants of an Issue:
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  Master