}
public void allowAllPermissionsToAdminRole(String messageBoxId) throws MessageBoxException {
try {
AuthorizationManager authorizationManager = Utils.getUserRelam().getAuthorizationManager();
String messageBoxPath = MessageBoxConstants.MB_MESSAGE_BOX_STORAGE_PATH + "/" +
messageBoxId;
String adminRoleName = MessageBoxServiceValueHolder.getInstance().
getRealmService().getBootstrapRealmConfiguration().getAdminRoleName();
authorizationManager.authorizeRole(adminRoleName, messageBoxPath,
MessageBoxConstants.SQS_OPERATION_DELETE_MESSAGE);
authorizationManager.authorizeRole(adminRoleName, messageBoxPath,
MessageBoxConstants.SQS_OPERATION_CHANGE_MESSAGE_VISIBILITY);
authorizationManager.authorizeRole(adminRoleName, messageBoxPath,
MessageBoxConstants.SQS_OPERATION_GET_QUEUE_ATTRIBUTES);
authorizationManager.authorizeRole(adminRoleName, messageBoxPath,
MessageBoxConstants.SQS_OPERATION_RECEIVE_MESSAGE);
authorizationManager.authorizeRole(adminRoleName, messageBoxPath,
MessageBoxConstants.SQS_OPERATION_SEND_MESSAGE);
} catch (UserStoreException e) {
String error = "Failed to add permissions to admin role for message box " + messageBoxId;
log.error(error);