use of io.crate.action.sql.SessionContext in project crate by crate.
the class AccessControlMaySeeTest method setUpUserAndValidator.
@Before
public void setUpUserAndValidator() {
validationCallArguments = new ArrayList<>();
user = new User("normal", Set.of(), Set.of(), null) {
@Override
public boolean hasAnyPrivilege(Privilege.Clazz clazz, String ident) {
validationCallArguments.add(CollectionUtils.arrayAsArrayList(clazz, ident, user.name()));
return true;
}
};
accessControl = new AccessControlImpl(userName -> user, new SessionContext(user));
}
Aggregations