Skip to content

Node.js based forum software built for the modern web

closes #2701

barisusaklif08554e788a3
diff --git a/src/controllers/admin/groups.js b/src/controllers/admin/groups.js
index 05c7294fdc..9d9e9ac18b 100644
--- a/src/controllers/admin/groups.js
+++ b/src/controllers/admin/groups.js
@@ -34,7 +34,7 @@ groupsController.get = function(req, res, next) {
},
function(exists, next) {
if (!exists) {
- helpers.notFound(req, res);
+ return helpers.notFound(req, res);
}
groups.get(groupName, {uid: req.uid}, next);
}
diff --git a/src/controllers/groups.js b/src/controllers/groups.js
index 84a3e25e2d..178170d53e 100644
--- a/src/controllers/groups.js
+++ b/src/controllers/groups.js
@@ -86,7 +86,8 @@ groupsController.details = function(req, res, next) {
},
posts: function(next) {
groups.getLatestMemberPosts(res.locals.groupName, 10, req.uid, next);
- }
+ },
+ isAdmin: async.apply(user.isAdministrator, req.uid)
}, function(err, results) {
if (err) {
return next(err);