mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 02:27:22 +02:00
this will cause a 404 when trying to access /group/cid-1-privilige-groups-find as an admin
This commit is contained in:
committed by
GitHub
parent
b61936294b
commit
7033d11ede
@@ -34,6 +34,9 @@ groupsController.list = async function (req, res) {
|
||||
groupsController.get = async function (req, res, next) {
|
||||
const slug = slugify(req.params.name);
|
||||
const groupName = await groups.getGroupNameByGroupSlug(slug);
|
||||
if (!groupName) {
|
||||
return next();
|
||||
}
|
||||
const [groupNames, group] = await Promise.all([
|
||||
getGroupNames(),
|
||||
groups.get(groupName, { uid: req.uid, truncateUserList: true, userListCount: 20 }),
|
||||
|
||||
Reference in New Issue
Block a user