| | |
| | | private static final String REPOSITORY = "repository";
|
| | |
|
| | | private static final String ROLE = "role";
|
| | | |
| | | private static final String MAILINGLIST = "mailingList";
|
| | |
|
| | | private final File realmFile;
|
| | |
|
| | |
| | | List<String> list = new ArrayList<String>(teams.keySet());
|
| | | return list;
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * Returns the list of all users who are allowed to bypass the access
|
| | | * restriction placed on the specified repository.
|
| | |
| | | if (model.users != null) {
|
| | | config.setStringList(TEAM, model.name, USER, new ArrayList<String>(model.users));
|
| | | }
|
| | |
|
| | | // null check on "final" mailing lists because JSON-sourced
|
| | | // TeamModel
|
| | | // can have a null users object
|
| | | if (model.mailingLists != null) {
|
| | | config.setStringList(TEAM, model.name, MAILINGLIST, new ArrayList<String>(
|
| | | model.mailingLists));
|
| | | }
|
| | | }
|
| | |
|
| | | config.save();
|
| | |
| | | team.addRepositories(Arrays.asList(config.getStringList(TEAM, teamname,
|
| | | REPOSITORY)));
|
| | | team.addUsers(Arrays.asList(config.getStringList(TEAM, teamname, USER)));
|
| | | team.addMailingLists(Arrays.asList(config.getStringList(TEAM, teamname, MAILINGLIST)));
|
| | |
|
| | | teams.put(team.name.toLowerCase(), team);
|
| | |
|