nodejs: user role

This commit is contained in:
Sergey Linnik
2025-03-14 14:02:43 +03:00
parent f83b4a8be8
commit a2088ae8e1
4 changed files with 16 additions and 2 deletions

View File

@ -1124,6 +1124,7 @@ app.get('/editor', (req, res) => { // define a handler for editing document
const { reviewGroups } = user;
const { commentGroups } = user;
const { userInfoGroups } = user;
const userRoles = user.roles;
const usersInfo = [];
const usersForProtect = [];
@ -1211,6 +1212,7 @@ app.get('/editor', (req, res) => { // define a handler for editing document
userImage: user.avatar ? `${req.DocManager.getServerUrl()}/images/${user.id}.png` : null,
name,
userGroup,
userRoles,
reviewGroups: JSON.stringify(reviewGroups),
commentGroups: JSON.stringify(commentGroups),
userInfoGroups: JSON.stringify(userInfoGroups),