summaryrefslogtreecommitdiff
path: root/indra/newview/llsechandler_basic.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2020-02-03 15:17:51 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2020-02-03 15:17:51 +0200
commite58b5263598368b6dec4a836c72c69b50d701911 (patch)
treed454f4ed2089cef10d6033f3780476b146e3dd7e /indra/newview/llsechandler_basic.cpp
parent95af08341c5b20e7faeb58a4d39fae5d8b25fcee (diff)
parenta52ef7ad60c8821fcb412988d838b58c0414ac8f (diff)
Merge branch 'DRTVWR-500' into DRTVWR-501
Diffstat (limited to 'indra/newview/llsechandler_basic.cpp')
-rw-r--r--indra/newview/llsechandler_basic.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp
index a8bb54a90e..55e49100c3 100644
--- a/indra/newview/llsechandler_basic.cpp
+++ b/indra/newview/llsechandler_basic.cpp
@@ -1664,6 +1664,19 @@ bool LLSecAPIBasicHandler::hasCredentialMap(const std::string& storage, const st
return credential.isMap();
}
+// returns true if map is empty or does not exist
+bool LLSecAPIBasicHandler::emptyCredentialMap(const std::string& storage, const std::string& grid)
+{
+ if (storage == DEFAULT_CREDENTIAL_STORAGE)
+ {
+ LL_ERRS() << "Storing maps in default, single-items storage is not allowed" << LL_ENDL;
+ }
+
+ LLSD credential = getProtectedData(storage, grid);
+
+ return !credential.isMap() || credential.size() == 0;
+}
+
// Load map of credentials from specified credential store, given the grid
void LLSecAPIBasicHandler::loadCredentialMap(const std::string& storage, const std::string& grid, credential_map_t& credential_map)
{