mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added extra server permission to see all server events.
This commit is contained in:
parent
976f6d5376
commit
75fd54c34d
3 changed files with 11 additions and 3 deletions
|
@ -3193,9 +3193,9 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
|||
const user = obj.users[userid];
|
||||
const subscriptions = [userid, 'server-global'];
|
||||
if (user.siteadmin != null) {
|
||||
// Allow full site administrators and user managers to get all events.
|
||||
if ((user.siteadmin == 0xFFFFFFFF) || ((user.siteadmin & 2) != 0)) subscriptions.push('*');
|
||||
if ((user.siteadmin & 2) != 0) {
|
||||
// Allow full site administrators of users with all events rights to see all events.
|
||||
if ((user.siteadmin == 0xFFFFFFFF) || ((user.siteadmin & 2048) != 0)) { subscriptions.push('*'); }
|
||||
else if ((user.siteadmin & 2) != 0) {
|
||||
if ((user.groups == null) || (user.groups.length == 0)) {
|
||||
// Subscribe to all user changes
|
||||
subscriptions.push('server-users');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue