class AdminPermissionInitializer implements EventSubscriber<PostUserPersistedEvent> {

  @PostConstruct
  public void init() throws ServerException {
    try {
      User adminUser = userManager.getByName(name);
      grantSystemPermissions(adminUser.getId());
    } catch (NotFoundException ex) {
      LOG.warn("Admin {} not found yet.", name);
    } finally {
      eventService.subscribe(this);
    }
  }

  @Inject public  AdminPermissionInitializer(
      @Named("che.system.admin_name") String name,
      UserManager userManager,
      PermissionsManager permissionsManager,
      EventService eventService);

}