congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Role.setSource
Code IndexAdd Tabnine to your IDE (free)

How to use
setSource
method
in
com.netflix.spinnaker.fiat.model.resources.Role

Best Java code snippets using com.netflix.spinnaker.fiat.model.resources.Role.setSource (Showing top 9 results out of 315)

origin: com.netflix.spinnaker.fiat/fiat-file

 public List<Role> getRoles() {
  if (roles == null) {
   return Collections.emptyList();
  }
  return roles.stream()
    .map(r -> new Role(r.getName()).setSource(Role.Source.FILE))
    .collect(Collectors.toList());
 }
}
origin: spinnaker/fiat

 public List<Role> getRoles() {
  if (roles == null) {
   return Collections.emptyList();
  }
  return roles.stream()
    .map(r -> new Role(r.getName()).setSource(Role.Source.FILE))
    .collect(Collectors.toList());
 }
}
origin: spinnaker/fiat

private static Role toRole(String name) {
 return new Role().setName(name.toLowerCase()).setSource(Role.Source.GITHUB_TEAMS);
}
origin: com.netflix.spinnaker.fiat/fiat-core

public UserPermission toUserPermission() {
 val roles = memberOf.stream()
           .map(membership -> new Role(membership).setSource(Role.Source.EXTERNAL))
           .collect(Collectors.toSet());
 return new UserPermission().setId(name).setRoles(roles);
}
origin: spinnaker/fiat

public UserPermission toUserPermission() {
 val roles = memberOf.stream()
           .map(membership -> new Role(membership).setSource(Role.Source.EXTERNAL))
           .collect(Collectors.toSet());
 return new UserPermission().setId(name).setRoles(roles);
}
origin: spinnaker/fiat

private static Role toRole(Group g) {
 return new Role().setName(g.getName().toLowerCase()).setSource(Role.Source.GOOGLE_GROUPS);
}
origin: com.netflix.spinnaker.fiat/fiat-google-groups

private static Role toRole(Group g) {
 return new Role().setName(g.getName().toLowerCase()).setSource(Role.Source.GOOGLE_GROUPS);
}
origin: spinnaker/fiat

@RequestMapping(value = "/{userId:.+}", method = RequestMethod.PUT)
public void putUserPermission(@PathVariable String userId,
               @RequestBody @NonNull List<String> externalRoles) {
 List<Role> convertedRoles = externalRoles
   .stream()
   .map(extRole -> new Role().setSource(Role.Source.EXTERNAL).setName(extRole))
   .collect(Collectors.toList());
 ExternalUser extUser = new ExternalUser().setId(ControllerSupport.convert(userId))
                      .setExternalRoles(convertedRoles);
 try {
  UserPermission userPermission = permissionsResolver.resolveAndMerge(extUser);
  log.debug(
    "Updated user permissions (userId: {}, roles: {}, suppliedExternalRoles: {})",
    userId,
    userPermission.getRoles().stream().map(Role::getName).collect(Collectors.toList()),
    externalRoles
  );
  permissionsRepository.put(userPermission);
 } catch (PermissionResolutionException pre) {
  throw new UserPermissionModificationException(pre);
 }
}
origin: spinnaker/fiat

.map(role -> new Role(role).setSource(Role.Source.LDAP))
.collect(Collectors.toList());
com.netflix.spinnaker.fiat.model.resourcesRolesetSource

Popular methods of Role

  • <init>
  • setName
  • getName
  • getSource

Popular in Java

  • Finding current android device location
  • putExtra (Intent)
  • getSystemService (Context)
  • setContentView (Activity)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now