setContent #
Replaces the content of the Role object.
Updating a role content will have no impact until the save method is called
setContent(data) #
| Arguments | Type | Description |
|---|---|---|
data | JSON Object | Role content |
Return Value #
Returns the Role object.
Usage #
JSONObject roleDefinition = new JSONObject()
.put("controllers", new JSONObject()
.put("*", new JSONObject()
.put("actions", new JSONObject()
.put("*", true)
)
)
)
);
role.setContent(roleDefinition);