mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-04 03:21:18 +01:00
use group name, hidden groups are not in groupslug:groupname
This commit is contained in:
@@ -27,7 +27,7 @@ groupsController.list = function(req, res, next) {
|
||||
};
|
||||
|
||||
groupsController.get = function(req, res, next) {
|
||||
var groupName = res.locals.groupName;
|
||||
var groupName = req.params.name;
|
||||
async.waterfall([
|
||||
function(next){
|
||||
groups.exists(groupName, next);
|
||||
|
||||
@@ -60,7 +60,7 @@ function addRoutes(router, middleware, controllers) {
|
||||
router.get('/manage/users/banned', controllers.admin.users.banned);
|
||||
|
||||
router.get('/manage/groups', controllers.admin.groups.list);
|
||||
router.get('/manage/groups/:slug', middleware.exposeGroupName, controllers.admin.groups.get);
|
||||
router.get('/manage/groups/:name', controllers.admin.groups.get);
|
||||
|
||||
router.get('/settings/:term?', controllers.admin.settings.get);
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group pull-right">
|
||||
<a href="{config.relative_path}/admin/manage/groups/{groups.slug}" class="btn btn-default btn-xs"><i class="fa fa-edit"></i> Edit</a>
|
||||
<a href="{config.relative_path}/admin/manage/groups/{groups.name}" class="btn btn-default btn-xs"><i class="fa fa-edit"></i> Edit</a>
|
||||
<!-- IF !groups.system -->
|
||||
<button class="btn btn-danger btn-xs" data-action="delete"><i class="fa fa-times"></i></button>
|
||||
<!-- ENDIF !groups.system -->
|
||||
|
||||
Reference in New Issue
Block a user