public class RoleDefChecker implements MessageSourceAware {
private MessageSourceAccessor messages;
public void check(RoleDef roleDef) {
if ((roleDef.getId() != null) && (roleDef.getId() == 1)) {
throw new CheckRoleException(messages.getMessage(
"auth.superuser.edit", "不允许修改超级管理员角色"));
}
}