Through javascript, I was hoping to check what groups a user belongs to and then use that information to show / hide something. I can't use ACLs because I'd like the average internal user to be able to enter the information on intake but not be able to edit it in future.
Using the API, I can get an object that has a
CRM.api3('Contact', 'get', {
"return": "group",
"id": 68525 // arbitrary number will need current user
}).done(function(result) {
// do something
console.log(result);
});
which returns this
Object { is_error: 0, version: 3, count: 1, id: 68525, values: Object }
The group info is in the values: Objects, how can I reference it?