use of com.willshex.blogwt.client.api.user.event.ChangeUserAccessEventHandler.ChangeUserAccessFailure in project blogwt by billy1380.
the class UserController method changeUserAccess.
private void changeUserAccess(Boolean revoke, User user, List<Permission> permissions, List<Role> roles, Boolean suspend, Date suspendUntil) {
final ChangeUserAccessRequest input = ApiHelper.setAccessCode(new ChangeUserAccessRequest());
input.session = SessionController.get().sessionForApiCall();
input.user = user;
input.revoke = revoke;
input.roles = roles;
input.permissions = permissions;
input.suspend = suspend;
input.suspendUntil = suspendUntil;
ApiHelper.createUserClient().changeUserAccess(input, new AsyncCallback<ChangeUserAccessResponse>() {
@Override
public void onSuccess(ChangeUserAccessResponse output) {
if (output.status == StatusType.StatusTypeSuccess) {
}
DefaultEventBus.get().fireEventFromSource(new ChangeUserAccessSuccess(input, output), UserController.this);
}
@Override
public void onFailure(Throwable caught) {
DefaultEventBus.get().fireEventFromSource(new ChangeUserAccessFailure(input, caught), UserController.this);
}
});
}
Aggregations