WIP managing a per-app current identity from the Tilde Friends navigation bar.

This commit is contained in:
2024-04-13 13:22:59 -04:00
parent c8b8a8fc03
commit 0412b97170
4 changed files with 94 additions and 14 deletions

View File

@ -474,7 +474,7 @@ static JSValue _httpd_auth_query(JSContext* context, JSValueConst this_val, int
JSValue settings_value = settings ? JS_ParseJSON(context, settings, strlen(settings), NULL) : JS_UNDEFINED;
JSValue permissions = JS_GetPropertyStr(context, settings_value, "permissions");
JSValue user_permissions = JS_GetPropertyStr(context, permissions, name_string);
int length = tf_util_get_length(context, user_permissions);
int length = !JS_IsUndefined(user_permissions) ? tf_util_get_length(context, user_permissions) : 0 ;
for (int i = 0; i < length; i++)
{
JSValue permission = JS_GetPropertyUint32(context, user_permissions, i);