getAllAgentAccess(resourceURL, doAutoAuth = true)

The pods:getAllAgentAccess() function returns an array of strings that represents all agent(s) (webID(s)), which is/are granted the read and/or write permission(s) to the specified resource.

The pods:getAllAgentAccess() function has the following parameters:

  • resourceURL — A required string parameter that informs the library what resource is to be checked for all agent(s) (webID(s)), which is/are granted read and/or write permission(s). The resource can be a folder or a file. This should be a full, absolute URL with an http scheme (e.g. for a folder: http://examplepodserver:org/podName/myPhotos/folder/, for a file: http://examplepodserver:org/podName/myPhotos/file.txt) and a folder does require a slash at the end.

  • doAutoAuth — An optional boolean parameter that controls automatic authentication attempts. It defaults to true if nothing is passed in for it. When true, the library will check that the stored authentication token is valid if it exists, and if the token is not valid or the token does not exist, the library will attempt to automatically authenticate once.

Copyright Picolabs | Licensed under Creative Commons.