fiat-roles/src/main/java/com/netflix/spinnaker/fiat/providers/DefaultApplicationProvider.java
private void ensureExecutePermission(@NonNull Application application) {
    Permissions permissions = application.getPermissions();

    if (permissions == null || !permissions.isRestricted()) {
      return;
    }

    Map<Authorization, List<String>> authorizations =
        Arrays.stream(Authorization.values())
            .collect(
                Collectors.toMap(
                    Function.identity(),
                    a -> Optional.ofNullable(permissions.get(a)).orElse(new ArrayList<>())));

    if (authorizations.get(Authorization.EXECUTE).isEmpty()) {
      authorizations.put(Authorization.EXECUTE, authorizations.get(this.executeFallback));
    }

    application.setPermissions(Permissions.Builder.factory(authorizations).build());
  }
/**
   * Set EXECUTE authorization(s) for the application. For applications that already have EXECUTE
   * set, this will be a no-op. For the remaining applications, we'll add EXECUTE based on the value
   * of the `executeFallback` flag.
   */
Set EXECUTE authorization(s) for the application. For applications that already have EXECUTE
set, this will be a no-op. For the remaining applications, we'll add EXECUTE based on the value
of the `executeFallback` flag.
Set EXECUTE authorization ( s ) for the application . For applications that already have EXECUTE set this will be a no - op . For the remaining applications we ' ll add EXECUTE based on the value of the ` executeFallback ` flag .
private void ensureExecutePermission(@NonNull Application application) {
    Permissions permissions = application.getPermissions();
    if (permissions == null || !permissions.isRestricted()) {
      return;
    }
    Map<Authorization, List<String>> authorizations =
        Arrays.stream(Authorization.values())
            .collect(
                Collectors.toMap(
                    Function.identity(),
                    a -> Optional.ofNullable(permissions.get(a)).orElse(new ArrayList<>())));
    if (authorizations.get(Authorization.EXECUTE).isEmpty()) {
      authorizations.put(Authorization.EXECUTE, authorizations.get(this.executeFallback));
    }
    application.setPermissions(Permissions.Builder.factory(authorizations).build());
  }
private void ensureExecutePermission ( @ NonNull Application application ) { Permissions permissions = application . getPermissions ( ) ; if ( permissions == null || ! permissions . isRestricted ( ) ) { return ; } Map < Authorization , List < String > > authorizations = Arrays . stream ( Authorization . values ( ) ) . collect ( Collectors . toMap ( Function . identity ( ) , a -> Optional . ofNullable ( permissions . get ( a ) ) . orElse ( new ArrayList < > ( ) ) ) ) ; if ( authorizations . get ( Authorization . EXECUTE ) . isEmpty ( ) ) { authorizations . put ( Authorization . EXECUTE , authorizations . get ( this . executeFallback ) ) ; } application . setPermissions ( Permissions . Builder . factory ( authorizations ) . build ( ) ) ; }
Set EXECUTE authorization(s) for the application.
Set EXECUTE authorization ( s ) for the application .