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

Create automation for file permissions scenarios with AL/MG

    Details

    • Type: Testing
    • Status: Closed
    • Priority: Minor
    • Resolution: Completed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Documents & Media
    • Labels:
      None
    • Story Points:
      5
    • Sprint:
      LIMA | QA Sprint 18

      Description

      Automate test cases against this requirement:

      Given an asset library connected to a site
      When an admin configures a media gallery widget on a page
      And selects a folder from an asset library
      Then the documents stored in the folder are shown, taking into account the appropriate permissions.
      

      For example if a document in an AL is only able to be viewed by a site member, then it should not be able to be viewed in MG by a guest if the AL is connected to it.

      Scenarios 1: An image stored in asset library folder cannot be viewed by a guest without permissions Via MG on a connected site

      DepotPermissions#CannotViewImageInMGAsGuest

      Test Steps:

      1. Add an asset library > Go to DM
      2. Add a folder > add an Image > Remove related permissions of guest
      3. Edit the asset library to connect a site
      4. Go to the site > Add a widget page with media gallery
      5. Configure the MG widget and select the asset library folder as the root folder
      6. Logout
      7. Access the site page
        • Assert the Image stored in asset library does not display

      Scenarios 2: An image stored in asset library folder can be edited by a user with permissions Via MG on a connected site

      DepotPermissions#CanEditImageInMG

      Test Steps:

      1. Add an asset library > Go to DM
      2. Add a folder > add an Image > Remove related permissions of both guest and user
      3. Add a new user
      4. Add a regular role > Define permissions under media gallery
        • Add Document > Update and View
      5. Assign the new user to the regular role
      6. Edit the asset library to connect a site
      7. Go to the site > Add a widget page with media gallery
      8. Configure the MG widget and select the asset library folder as the root folder
      9. Logout > Login in as new user
      10. Access the site page
      11. Edit the Image stored in asset library
      12. Go to DM of asset library
        • Assert the Image title updated

      Scenarios 3: An image stored in asset library folder can be deleted by a user with permissions Via MG on a connected site

      DepotPermissions#CanDeleteImageInMG

      Test Steps:

      1. Add an asset library > Go to DM
      2. Add a folder > add an Image > Remove related permissions of both guest and user
      3. Add a new user
      4. Add a regular role > Define permissions under media gallery
        • Add Document > Delete and View
      5. Assign the new user to the regular role
      6. Edit the asset library to connect a site
      7. Go to the site > Add a widget page with media gallery
      8. Configure the MG widget and select the asset library folder as the root folder
      9. Logout > Login in as new user
      10. Access the site page
      11. Delete the Image stored in asset library
      12. Go to DM of asset library
        • Assert the Image does not display

      Scenarios 4: An image stored in asset library folder can be viewed by a user with permissions Via MG on a connected site

      DepotPermissions#CanAddImageToFolderViaMG

      Scenarios 5: An image can be added to asset library folder by a user with permissions Via MG on a connected site

      DepotPermissions#CanAddImageToFolderViaMG

      Test Steps:

      1. Add a new user
      2. Add an asset library > Go to DM
      3. Add a folder > add an Image > Remove related permissions of guest
      4. Edit the asset library to connect a site
      5. Go to the site > Add a widget page with media gallery
      6. Configure the MG widget and select the asset library folder as the root folder
      7. Logout > Login as the new user
      8. Access the site page
        • Assert the Image stored in asset library display
      9. Add a another image
      10. Login as Test Test
      11. Go to asset library folder
        • Assert the new image display

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              beck.liu Beck Liu
              Reporter:
              austin.chiang Austin Chiang
              Recent user:
              Austin Chiang
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package