server: fix acl crash

This commit is contained in:
Koushik Dutta
2022-12-30 22:05:28 -08:00
parent e359a704e3
commit 5f319ea5e8
3 changed files with 4 additions and 4 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/server",
"version": "0.4.10",
"version": "0.4.11",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/server",
"version": "0.4.10",
"version": "0.4.11",
"license": "ISC",
"dependencies": {
"@ffmpeg-installer/ffmpeg": "^1.1.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/server",
"version": "0.4.10",
"version": "0.4.11",
"description": "",
"dependencies": {
"@ffmpeg-installer/ffmpeg": "^1.1.0",

View File

@@ -394,7 +394,7 @@ export class ScryptedRuntime extends PluginHttp<HttpPluginData> {
let accessControls: AccessControls;
if (username) {
const user = await this.datastore.tryGet(ScryptedUser, username);
if (user.aclId) {
if (user?.aclId) {
const accessControl = this.getDevice<SU>(user.aclId);
try {
const acls = await accessControl.getScryptedUserAccessControl();