UpdateGroupEntityAcl
Update the acl settings for a group entity, enforcing ownership.
Service | Operation |
---|---|
group | UPDATE_GROUP_ENTITY_ACL |
Method Parameters
Parameter | Description |
---|---|
groupId | The id of the group. |
entityId | The id of the entity to update. |
acl | Access control list for the group entity. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string groupId = "a-group-id";
string entityId = "a-group-entity-id";
string acl = "{ \"member\": 1, \"other\": 0 }";
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};
_bc.GroupService.UpdateGroupEntityAcl(groupId, entityId, acl, successCallback, failureCallback);
const char *groupId = "a-group-id";
const char *entityId = "a-group-entity-id";
const char *acl = "{ \"member\": 1, \"other\": 0 }";
_bc->getGroupService()->updateGroupEntityAcl(groupId, entityId, acl, this);
NSString *groupId = @"a-group-id";
NSString *entityId = @"a-group-entity-id";
NSString *acl = "{ \"member\": 1, \"other\": 0 }";
BCCompletionBlock successBlock; // define callback
BCErrorCompletionBlock failureBlock; // define callback
[[_bc groupService] updateGroupEntityAcl:
groupId:groupId
entityId:entityId
acl:acl
completionBlock:successBlock
errorCompletionBlock:failureBlock
cbObject:nil];
String groupId = "a-group-id";
String entityId = "a-group-entity-id";
String acl = "{ \"member\": 1, \"other\": 0 }";
this; // implements IServerCallback
_bc.getGroupService().updateGroupEntityAcl(groupId, entityId, acl, this);
public void serverCallback(ServiceName serviceName, ServiceOperation serviceOperation, JSONObject jsonData)
{
System.out.print(String.format("Success | %s", jsonData.toString()));
}
public void serverError(ServiceName serviceName, ServiceOperation serviceOperation, int statusCode, int reasonCode, String jsonError)
{
System.out.print(String.format("Failed | %d %d %s", statusCode, reasonCode, jsonError.toString()));
}
var groupId = "a-group-id";
var entityId = "a-group-entity-id";
var acl = {
"member": 1,
"other": 0
};
_bc.group.updateGroupEntityAcl(groupId, entityId, acl, result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
var groupId = "a-group-id";
var entityId = "a-group-entity-id";
var acl = {
"member": 1,
"other": 0
};
ServerResponse result = await _bc.groupService.updateGroupEntityAcl(groupId:groupId, entityId:entityId, acl:acl);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
var groupId = "a-group-id";
var entityId = "a-group-entity-id";
var acl = {
"member": 1,
"other": 0
};
var groupProxy = bridge.getGroupServiceProxy();
var postResult = groupProxy.updateGroupEntityAcl(groupId, entityId, acl);
if (postResult.status == 200) {
// Success!
}
{
"service": "group",
"operation": "UPDATE_GROUP_ENTITY_ACL",
"data":
{
"groupId": "a-group-id",
"entityId": "a-group-entity-id",
"acl": {
"member": 1,
"other": 0
}
}
}
JSON Response
{
"data": {
"createdAt": 1666994425075,
"entityType": "myEntityType",
"groupId": "2bf538d1-19ea-4e14-9862-f979215e09b7",
"entityId": "e62dfe16-e6ec-4ebf-b044-2bb3626027e8",
"acl": {
"member": 1,
"other": 0
},
"ownerId": null,
"version": 2,
"updatedAt": 1666994963444
},
"status": 200
}