|
|
|
@ -82,7 +82,12 @@ groupsController.details = function(req, res, callback) {
|
|
|
|
|
posts: function(next) {
|
|
|
|
|
groups.getLatestMemberPosts(res.locals.groupName, 10, req.uid, next);
|
|
|
|
|
},
|
|
|
|
|
isAdminOrGlobalMod: async.apply(user.isAdminOrGlobalMod, req.uid)
|
|
|
|
|
isAdmin:function(next) {
|
|
|
|
|
user.isAdministrator(req.uid, next);
|
|
|
|
|
},
|
|
|
|
|
isGlobalMod: function(next) {
|
|
|
|
|
user.isGlobalModerator(req.uid, next);
|
|
|
|
|
}
|
|
|
|
|
}, next);
|
|
|
|
|
}
|
|
|
|
|
], function(err, results) {
|
|
|
|
@ -93,7 +98,7 @@ groupsController.details = function(req, res, callback) {
|
|
|
|
|
if (!results.group) {
|
|
|
|
|
return callback();
|
|
|
|
|
}
|
|
|
|
|
results.group.isOwner = results.group.isOwner || results.isAdminOrGlobalMod;
|
|
|
|
|
results.group.isOwner = results.group.isOwner || results.isAdmin || (results.isGlobalMod && !results.group.system);
|
|
|
|
|
results.title = '[[pages:group, ' + results.group.displayName + ']]';
|
|
|
|
|
results.breadcrumbs = helpers.buildBreadcrumbs([{text: '[[pages:groups]]', url: '/groups' }, {text: results.group.displayName}]);
|
|
|
|
|
results.allowPrivateGroups = parseInt(meta.config.allowPrivateGroups, 10) === 1;
|
|
|
|
|