GroveStreams
hicaro private msg quote post Address this user
I am developing an web application that allows users to share their own networks with other registered users. Each network is mapped to a Grovestreams organization which requires me to shared the organization as well.

In order to do that I used the API call PUT org_user (https://www.grovestreams.com/developers/apiorguser.html). It worked well. After calling it the organization appears in the grantee's list of organizations.

Although the new user is not able to access the Observation Studio.

I used the following role parameters to grant access:

{
"org_user": {
"uid": "...",
"affiliation": "...",
"isOwner": "false",
"compStudioRole": "EDITOR",
"compRole": "EDITOR",
"contentRole": "EDITOR",
}
}

They are pretty much the same as the example on the API page. I also tried to use the VIEWER role which also did not work for that purpose.

Am I missing any argument in the call or is there any other call I need to make to grant access on the Observation Studio?
Post 1 IP   flag post
MikeMills private msg quote post Address this user
That's an old API call that we need to update on our API page. Sorry about that.

All you need to do is add the new user to a Group in the organization. Add them to the Users group or the Administrators group. Or create your own group and set the capabilities and add the new group to the Root Content and Component folders.

To see the new API in action: Use the Chrome web browser (or your favorite browser), Log into GS and enter your organization, select Admin-Manage Users, Find a user to add, add their group(s), hit F12 to bring up the browser debugger window, Click the network tab and select the XHR filter. Save the new user and watch the GS API calls made to add a user to a group. Make that call to add your new user to a group.

See the Requested Header and the Requested payload (JSON) in the Network tab call to GS.

Hope that helps.
Post 2 IP   flag post
hicaro private msg quote post Address this user
That helped a lot Mike!

Just a question. Will the group "Users" always exist?

Because I will assume in my application that a group called "Users" will always exist and then fetch its uid and use it for the association call.

Thanks for you time and the super fast response.
Post 3 IP   flag post
MikeMills private msg quote post Address this user
Yes, it is created by default for every new organization.
Post 4 IP   flag post
2965 4 4
Log in or sign up to compose a reply.