mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-12 19:11:51 +00:00
Fixed user group management.
This commit is contained in:
parent
07b0c8fe86
commit
ba8a73ec7a
2 changed files with 11 additions and 4 deletions
|
@ -1474,8 +1474,11 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the domain
|
// Get the domain
|
||||||
var delGroupDomain = parent.parent.config.domains[ugroupidsplit[1]];
|
var delGroupDomain;
|
||||||
|
if (ugroupidsplit != null) {
|
||||||
|
delGroupDomain = parent.parent.config.domains[ugroupidsplit[1]];
|
||||||
if (delGroupDomain == null) { err = "Invalid domain id"; }
|
if (delGroupDomain == null) { err = "Invalid domain id"; }
|
||||||
|
}
|
||||||
|
|
||||||
// Handle any errors
|
// Handle any errors
|
||||||
if (err != null) {
|
if (err != null) {
|
||||||
|
|
|
@ -1121,7 +1121,7 @@
|
||||||
<td class="style14">
|
<td class="style14">
|
||||||
<div style="float:right">
|
<div style="float:right">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div id="p50userGroupOps">
|
||||||
<input type=button id=UsersGroupsSelectAllButton onclick="p50usersSelectallButtonFunction()" value="Select All" />
|
<input type=button id=UsersGroupsSelectAllButton onclick="p50usersSelectallButtonFunction()" value="Select All" />
|
||||||
<input type=button id=UsersGroupsGroupActionButton disabled="disabled" value="Group Action" onclick=p50usersGroupActionFunction() />
|
<input type=button id=UsersGroupsGroupActionButton disabled="disabled" value="Group Action" onclick=p50usersGroupActionFunction() />
|
||||||
<input id=NewUserGroupButton type=button onclick=showCreateUserGroupDialog(1) value="New Group..." />
|
<input id=NewUserGroupButton type=button onclick=showCreateUserGroupDialog(1) value="New Group..." />
|
||||||
|
@ -2053,6 +2053,7 @@
|
||||||
// We are user administrator
|
// We are user administrator
|
||||||
if (users == null) { meshserver.send({ action: 'users' }); }
|
if (users == null) { meshserver.send({ action: 'users' }); }
|
||||||
if (wssessions == null) { meshserver.send({ action: 'wssessioncount' }); }
|
if (wssessions == null) { meshserver.send({ action: 'wssessioncount' }); }
|
||||||
|
mainUpdate(8192 + 16384);
|
||||||
} else {
|
} else {
|
||||||
// We are not user administrator
|
// We are not user administrator
|
||||||
users = null;
|
users = null;
|
||||||
|
@ -14239,6 +14240,9 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
function updateUserGroups() {
|
function updateUserGroups() {
|
||||||
|
// Display user group operations only if allowed for us
|
||||||
|
QV('p50userGroupOps', (userinfo.siteadmin & 256) != 0); // SITERIGHT_USERGROUPS = 256
|
||||||
|
|
||||||
// Sort the list of group names
|
// Sort the list of group names
|
||||||
var sortedGroups = [], x = '';
|
var sortedGroups = [], x = '';
|
||||||
if (usergroups) { for (var i in usergroups) { sortedGroups.push(usergroups[i]); } }
|
if (usergroups) { for (var i in usergroups) { sortedGroups.push(usergroups[i]); } }
|
||||||
|
@ -14263,7 +14267,7 @@
|
||||||
|
|
||||||
// Re-check userid's
|
// Re-check userid's
|
||||||
elements = document.getElementsByClassName('UserGroupCheckbox');
|
elements = document.getElementsByClassName('UserGroupCheckbox');
|
||||||
for (var i=0;i<elements.length;i++) { elements[i].checked = ((checkedUserGroupids.indexOf(elements[i].value) >= 0)); }
|
for (var i = 0; i < elements.length; i++) { elements[i].checked = ((checkedUserGroupids.indexOf(elements[i].value) >= 0)); }
|
||||||
p50updateInfo();
|
p50updateInfo();
|
||||||
|
|
||||||
// Update current user panel if needed
|
// Update current user panel if needed
|
||||||
|
|
Loading…
Reference in a new issue