0 Replies Latest reply on Aug 9, 2016 3:25 AM by mattdickens

    How to determine if user has access to a private group via API


      I have written a search tile that allows group owners to specify which places it should search (and optionally choose to include any child projects/subspaces). Part of the functionality allows users to display the places being searched as a hierarchical tree structure.




      This displayed list must exclude any of the specified groups or spaces that the current user does not have access to (private or secret). Detecting those secret groups the user does not have access to is simple but I don't see how I can check for private groups the current user does not have access to using the API. I'm hoping this is a stupid question and I'm missing something obvious but I can't for the life of me figure out what it is!


      I had hoped to be able to perform a simple call and check the status of the response and while this is fine for secret groups, it always returns 200 for private groups regardless of whether the user is a member of it or not.



        v: "v3",


      }).execute(function(response) {

      if (response.status == 200) {.......


      I appreciate that I could check for the number of docs in the group and assume that if there is 0 then the user does not have access but there is the possibility that the group doesn't have any content yet.


      Can anyone suggest an endpoint I can use to check if the current user has access to a specified place?