Welcome to the new Box Support website. Check out all the details here on what’s changed.

Using Java SDK to dermine if a folder is a collaboration or not?

New post

Comments

3 comments

  • AaronV

    Hi Pascal,

     

    Can you help us understand your use case of why the app needs to know this?

     

    Thanks!

    0
    Comment actions Permalink
  • pascal23

    Hi,

     

    the app tries to get all files from an enterprise and uses the "as-user" header to access the root folders of all the users. For that we use the Box Java SDK. The problem is that a folder that is shared (collaboration) occurs in the folder hierarchy of multiple users and I see no way to distinguish a "real" folder from a collaboration folder.

     

    In the moment I assume that the owner of a folder is the user where the folder really is and therefore if the owner is not the user we currently are using (with the "as-user" header) than the folder is a collaboration and can be ignored. This seems to work.

     

    Greetings,

    Pascal

    0
    Comment actions Permalink
  • jmoldow_box

    > the owner of a folder is the user where the folder really is and therefore if the owner is not the user we currently are using (with the "as-user" header) than the folder is a collaboration and can be ignored

     

    This is correct. The owner is always going to be the only non-collaborator, and the owner's file tree is the canonical location of the file. Everyone else is a collaborator.

    0
    Comment actions Permalink

Please sign in to leave a comment.