mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
fix: regression via c1b3079d93
Also refactored privilege render logic so that it no longer needs a server-side hack to render column count
This commit is contained in:
@@ -53,14 +53,6 @@ categoriesAPI.getPrivileges = async (caller, cid) => {
|
||||
responsePayload = await privileges.categories.list(cid);
|
||||
}
|
||||
|
||||
// The various privilege .list() methods return superfluous data for the template, return only a minimal set
|
||||
const validKeys = ['users', 'groups'];
|
||||
Object.keys(responsePayload).forEach((key) => {
|
||||
if (!validKeys.includes(key)) {
|
||||
delete responsePayload[key];
|
||||
}
|
||||
});
|
||||
|
||||
return responsePayload;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user