Skip to content

Node.js based forum software built for the modern web

closes #4341

barisusaklid227d526d170
diff --git a/public/src/client/groups/details.js b/public/src/client/groups/details.js
index 49f1d221f6..c95120ef77 100644
--- a/public/src/client/groups/details.js
+++ b/public/src/client/groups/details.js
@@ -51,7 +51,7 @@ define('forum/groups/details', [
detailsPage.on('click', '[data-action]', function() {
var btnEl = $(this),
userRow = btnEl.parents('[data-uid]'),
- ownerFlagEl = userRow.find('.member-name i'),
+ ownerFlagEl = userRow.find('.member-name > i'),
isOwner = !ownerFlagEl.hasClass('invisible') ? true : false,
uid = userRow.attr('data-uid'),
action = btnEl.attr('data-action');
diff --git a/src/controllers/groups.js b/src/controllers/groups.js
index 588a44d56f..106df26075 100644
--- a/src/controllers/groups.js
+++ b/src/controllers/groups.js
@@ -82,7 +82,7 @@ groupsController.details = function(req, res, callback) {
posts: function(next) {
groups.getLatestMemberPosts(res.locals.groupName, 10, req.uid, next);
},
- isAdmin: async.apply(user.isAdministrator, req.uid)
+ isAdminOrGlobalMod: async.apply(user.isAdminOrGlobalMod, req.uid)
}, next);
}
], function(err, results) {
@@ -93,6 +93,7 @@ groupsController.details = function(req, res, callback) {
if (!results.group) {
return callback();
}
+ results.group.isOwner = results.group.isOwner || results.isAdminOrGlobalMod;
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;