diff --git a/public/templates/admin/groups.tpl b/public/templates/admin/groups.tpl
index bd21db2b9f..39967ad648 100644
--- a/public/templates/admin/groups.tpl
+++ b/public/templates/admin/groups.tpl
@@ -10,12 +10,12 @@
{groups.name}
{groups.description}
+
-
-
+
diff --git a/src/groups.js b/src/groups.js
index 8d9b50067c..9b32cc7839 100644
--- a/src/groups.js
+++ b/src/groups.js
@@ -70,7 +70,7 @@
results.base.count = results.users.length;
results.base.members = results.users;
- results.base.deletable = parseInt(results.base.gid, 10) !== 1;
+ results.base.deletable = results.base.hidden !== '1';
callback(err, results.base);
});
diff --git a/src/routes/admin.js b/src/routes/admin.js
index 57c27519f2..af1f534f13 100644
--- a/src/routes/admin.js
+++ b/src/routes/admin.js
@@ -2,6 +2,7 @@ var nconf = require('nconf'),
fs = require('fs'),
path = require('path'),
winston = require('winston'),
+ async = require('async'),
db = require('./../database'),
user = require('./../user'),
@@ -421,9 +422,20 @@ var nconf = require('nconf'),
});
app.get('/groups', function (req, res) {
- groups.list({
- expand: true
- }, function (err, groups) {
+ async.parallel([
+ function(next) {
+ groups.list({
+ expand: true
+ }, next);
+ },
+ function(next) {
+ groups.listSystemGroups({
+ expand: true
+ }, next);
+ }
+ ], function(err, data) {
+ var groups = data[0].concat(data[1]);
+
res.json(200, {
groups: groups,
yourid: req.user.uid