/** * Gets the form for the creation of a mapping */ @RequestMapping(value = "ldap-mapping/create", method = RequestMethod.GET) public Form getMappingCreationForm() { securityService.checkGlobalFunction(AccountGroupManagement.class); return AccountGroupMapping.form( accountService.getAccountGroups() ); }
private List<Account> getAccountsForGroup(AccountGroup accountGroup) { return accountService.getAccountsForGroup(accountGroup); } }
checkArgList(environment, ID_ARGUMENT); return Collections.singletonList( accountService.getAccountGroup(ID.of(id)) ); } else { return accountService.getAccountGroups().stream() .filter(filter) .collect(Collectors.toList());
accountService.findUserByNameAndSource(username, ldapAuthenticationSourceProvider) ); if (!existingAccount.isPresent()) { accountService.create( new AccountInput( name,
private GQLTypeProjectAuthorization.Model getProjectAuthorizations(Project project, ProjectRole projectRole) { return new GQLTypeProjectAuthorization.Model( projectRole.getId(), projectRole.getName(), projectRole.getDescription(), accountService.findAccountGroupsByProjectRole(project, projectRole), accountService.findAccountsByProjectRole(project, projectRole) ); } }
protected Account doCreateAccount(List<AccountGroup> accountGroups) throws Exception { return asUser().with(AccountManagement.class).call(() -> { String name = uid("A"); return accountService.create( new AccountInput( name, "Test " + name, name + "@test.com", "test", accountGroups.stream().map(Entity::id).collect(Collectors.toList()) ) ); }); }
checkArgList(environment, ID_ARGUMENT); return Collections.singletonList( accountService.getAccount(ID.of(id)) ); } else { return accountService.getAccounts().stream() .filter(filter) .collect(Collectors.toList());
protected AccountGroup doCreateAccountGroup() throws Exception { return asUser().with(AccountGroupManagement.class).call(() -> { String name = uid("G"); return accountService.createGroup( NameDescription.nd(name, "") ); }); }
/** * Gets the form to update a mapping */ @RequestMapping(value = "ldap-mapping/{id}/update", method = RequestMethod.GET) public Form getMappingUpdateForm(@PathVariable ID id) { securityService.checkGlobalFunction(AccountGroupManagement.class); return accountGroupMappingService.getMapping(LDAPExtensionFeature.LDAP_GROUP_MAPPING, id).asForm( accountService.getAccountGroups() ); }