diff options
author | James Moger <james.moger@gitblit.com> | 2011-12-28 16:20:39 -0500 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2011-12-28 16:20:39 -0500 |
commit | abeaaf77673e9e764fe68e398eeda1e3c3c22ea5 (patch) | |
tree | 0f19b665eafa7e6e5151098fd8eb3c4b749de31d /src/com/gitblit/FileUserService.java | |
parent | 357109c5a5518db5925f49a6700a87e7ed30ca14 (diff) | |
download | gitblit-abeaaf77673e9e764fe68e398eeda1e3c3c22ea5.tar.gz gitblit-abeaaf77673e9e764fe68e398eeda1e3c3c22ea5.zip |
Show additional columns in users and teams tables
Diffstat (limited to 'src/com/gitblit/FileUserService.java')
-rw-r--r-- | src/com/gitblit/FileUserService.java | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/src/com/gitblit/FileUserService.java b/src/com/gitblit/FileUserService.java index 88c7d790..9c4e507d 100644 --- a/src/com/gitblit/FileUserService.java +++ b/src/com/gitblit/FileUserService.java @@ -340,6 +340,22 @@ public class FileUserService extends FileSettings implements IUserService { }
/**
+ * Returns the list of all users available to the login service.
+ *
+ * @return list of all usernames
+ */
+ @Override
+ public List<UserModel> getAllUsers() {
+ read();
+ List<UserModel> list = new ArrayList<UserModel>();
+ for (String username : getAllUsernames()) {
+ list.add(getUserModel(username));
+ }
+ Collections.sort(list);
+ return list;
+ }
+
+ /**
* Returns the list of all users who are allowed to bypass the access
* restriction placed on the specified repository.
*
@@ -670,6 +686,20 @@ public class FileUserService extends FileSettings implements IUserService { }
/**
+ * Returns the list of all teams available to the login service.
+ *
+ * @return list of all teams
+ * @since 0.8.0
+ */
+ @Override
+ public List<TeamModel> getAllTeams() {
+ List<TeamModel> list = new ArrayList<TeamModel>(teams.values());
+ list = DeepCopier.copy(list);
+ Collections.sort(list);
+ return list;
+ }
+
+ /**
* Returns the list of all teams who are allowed to bypass the access
* restriction placed on the specified repository.
*
@@ -757,7 +787,7 @@ public class FileUserService extends FileSettings implements IUserService { // remove role from team
for (String name : needsRemoveRole) {
String team = "@" + name;
- String[] values = allUsers.getProperty(team).split(",");
+ String[] values = allUsers.getProperty(team).split(",");
StringBuilder sb = new StringBuilder();
for (int i = 0; i < values.length; i++) {
String value = values[i];
|