Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-72012

Improve API to get Space permissions

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      Summary

      At present the API /wiki/rest/api/space/KEY?expand=permissions doesnt give results for ALL>>Delete Own, PAGE >>archive and MAIL>>Delete

      Steps to Reproduce

      1. Open a browser tab
      2. Add a JSON viewer extension from the web store
      3. Add a set of permissions on the UI end of the space.
      4. Use this API https://sitename.atlassian.net/wiki/rest/api/space/spacekey?expand=permissions to get the space permissions.
      5. It should all the permissions parameter i.e all 15 in space permissions.
      6. Currently, this API will only give 12 operations excluding ALL>>Delete Own, PAGE >>archive and MAIL>>Delete

        Browser Console
        function main() {
            const getData = async () => {
                const url = 'https://<SITENAME>.atlassian.net/wiki/rest/api/space/<SPACEKEY>?expand=permissions';
                const response = await fetch(url).then((r) => (r.json()));
                response.permissions.forEach(ele => {console.log(ele.operation)})
            };
            getData();
        }
        main();
        

        Outcome

        {operation: "restrict_content", targetType: "space"}
        VM1098:5 {operation: "create", targetType: "attachment"}
        VM1098:5 {operation: "delete", targetType: "page"}
        VM1098:5 {operation: "export", targetType: "space"}
        VM1098:5 {operation: "create", targetType: "comment"}
        VM1098:5 {operation: "create", targetType: "blogpost"}
        VM1098:5 {operation: "delete", targetType: "comment"}
        VM1098:5 {operation: "delete", targetType: "blogpost"}
        VM1098:5 {operation: "delete", targetType: "attachment"}
        VM1098:5 {operation: "create", targetType: "page"}
        VM1098:5 {operation: "administer", targetType: "space"}
        VM1098:5 {operation: "read", targetType: "space"}
        

      It's not showing Archive, Delete Own, and Mail delete permissions

      Suggestion

      For Users to inspect and see consolidated space permissions, it's good to include all 15 operations when using API.

      Attachments

        1. 20210420171335.json
          3 kB
        2. screenshot-1.png
          screenshot-1.png
          81 kB

        Issue Links

          Activity

            People

              72d7b3b8ece6 Paul Huff
              b0b849db5d18 Trupti Das
              Votes:
              12 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated: