Expose a thing so that the admin app can show permissions.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3955 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
4d629c45eb
commit
41590921c3
@ -179,6 +179,9 @@ async function getProcessBlob(blobId, key, options) {
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
'permissionsForUser': function(user) {
|
||||||
|
return (gGlobalSettings?.permissions ? gGlobalSettings.permissions[user] : []) ?? [];
|
||||||
|
},
|
||||||
'apps': user => getApps(user, process),
|
'apps': user => getApps(user, process),
|
||||||
'getSockets': getSockets,
|
'getSockets': getSockets,
|
||||||
'permissionTest': function(permission) {
|
'permissionTest': function(permission) {
|
||||||
@ -756,7 +759,6 @@ function storePermission(user, packageOwner, packageName, permission, allow) {
|
|||||||
}
|
}
|
||||||
if (gGlobalSettings.userPermissions[user][packageOwner][packageName][permission] !== allow) {
|
if (gGlobalSettings.userPermissions[user][packageOwner][packageName][permission] !== allow) {
|
||||||
gGlobalSettings.userPermissions[user][packageOwner][packageName][permission] = allow;
|
gGlobalSettings.userPermissions[user][packageOwner][packageName][permission] = allow;
|
||||||
print('STORE', JSON.stringify(gGlobalSettings));
|
|
||||||
setGlobalSettings(gGlobalSettings);
|
setGlobalSettings(gGlobalSettings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user