Search in sources :

Example 1 with ElevationRunnerImpl

use of org.summerb.security.elevation.impl.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.users.api.dto.User) ElevationRunnerImpl(org.summerb.security.elevation.impl.ElevationRunnerImpl)

Aggregations

ElevationRunnerImpl (org.summerb.security.elevation.impl.ElevationRunnerImpl)1 User (org.summerb.users.api.dto.User)1