core: Fix a disagreement determining the active identity.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 9m34s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 9m34s
This commit is contained in:
10
src/api.js.c
10
src/api.js.c
@@ -446,15 +446,15 @@ static void _tf_ssb_getActiveIdentity_work(tf_ssb_t* ssb, void* user_data)
|
|||||||
tf_ssb_db_identity_get_active(db, request->name, request->package_owner, request->package_name, request->identity, sizeof(request->identity));
|
tf_ssb_db_identity_get_active(db, request->name, request->package_owner, request->package_name, request->identity, sizeof(request->identity));
|
||||||
tf_ssb_release_db_reader(ssb, db);
|
tf_ssb_release_db_reader(ssb, db);
|
||||||
|
|
||||||
if (!*request->identity)
|
|
||||||
{
|
|
||||||
tf_ssb_db_identity_visit(ssb, request->name, _tf_ssb_getActiveIdentity_visit, request);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!*request->identity && tf_ssb_db_user_has_permission(ssb, NULL, request->name, "administration"))
|
if (!*request->identity && tf_ssb_db_user_has_permission(ssb, NULL, request->name, "administration"))
|
||||||
{
|
{
|
||||||
tf_ssb_whoami(ssb, request->identity, sizeof(request->identity));
|
tf_ssb_whoami(ssb, request->identity, sizeof(request->identity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!*request->identity)
|
||||||
|
{
|
||||||
|
tf_ssb_db_identity_visit(ssb, request->name, _tf_ssb_getActiveIdentity_visit, request);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _tf_ssb_getActiveIdentity_after_work(tf_ssb_t* ssb, int status, void* user_data)
|
static void _tf_ssb_getActiveIdentity_after_work(tf_ssb_t* ssb, int status, void* user_data)
|
||||||
|
|||||||
Reference in New Issue
Block a user