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

Update permission does not remove permissions of not included roleNames

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Duplicate
    • Affects Version/s: Master
    • Fix Version/s: None
    • Component/s: Headless Delivery API
    • Labels:
      None

      Description

      When a PUT request is done to a permission endpoint, it does a partial update instead of a replace, leaving the permissions of not included roleNames, instead of removing them.

       

      Steps to reproduce:

      1. **Create a site
      2. Make a PUT request to the endpoint _http://localhost:8080/o/headless-delivery/v1.0/sites/\ {SITE_ID}

        /structured-contents/permissions_

      with the created site and the body:

      [{[{ "actionIds": [ "PERMISSIONS", "ADD_FEED", "ADD_TEMPLATE", "UPDATE", "ADD_ARTICLE", "VIEW", "SUBSCRIBE", "ADD_FOLDER", "ADD_STRUCTURE" ], "roleName": "Owner" }, { "actionIds": [ "VIEW" ], "roleName": "Site Member" }]

      Result: The Guest roleName still has permissions as the response shows

      ExpectedResult: The Guest roleName has no permission and it is not included in the response

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              javier.dearcos Javier de Arcos Velilla
              Participants of an Issue:
              Recent user:
              Javier de Arcos Velilla
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                27 weeks, 6 days ago

                  Packages

                  Version Package