Search in sources :

Example 1 with ElevationRunnerImpl

use of org.summerb.approaches.springmvc.security.elevation.ElevationRunnerImpl in project summerb by skarpushin.

the class UsersServiceFacadeImpl method runUserRegisteredHandler.

protected void runUserRegisteredHandler(final User user) {
    if (userRegisteredHandler == null) {
        return;
    }
    List<String> perms = permissionService.findUserPermissionsForSubject(SecurityConstants.DOMAIN, user.getUuid(), null);
    ElevationRunnerImpl runAs = new ElevationRunnerImpl(new ElevationStrategyRunAsUserImpl<User>(user, perms));
    runAs.runElevated(new Runnable() {

        @Override
        public void run() {
            userRegisteredHandler.onUserRegistered(user);
        }
    });
}
Also used : User(org.summerb.microservices.users.api.dto.User) ElevationRunnerImpl(org.summerb.approaches.springmvc.security.elevation.ElevationRunnerImpl)

Aggregations

ElevationRunnerImpl (org.summerb.approaches.springmvc.security.elevation.ElevationRunnerImpl)1 User (org.summerb.microservices.users.api.dto.User)1