]> git.stg.codes - stg.git/blobdiff - projects/stargazer/user_impl.cpp
Added a function that lists all plugins that authorize the user.
[stg.git] / projects / stargazer / user_impl.cpp
index ac8399cabe77cf7149267dcdc71562eab1ac7563..5bb0069fb6f04b79a476001e135d09ddd7a3176d 100644 (file)
@@ -38,6 +38,8 @@
 #include <cassert>
 #include <cstdlib>
 #include <cmath>
 #include <cassert>
 #include <cstdlib>
 #include <cmath>
+#include <algorithm>
+#include <functional>
 
 #include "stg/users.h"
 #include "stg/common.h"
 
 #include "stg/users.h"
 #include "stg/common.h"
@@ -566,6 +568,13 @@ STG_LOCKER lock(&mutex, __FILE__, __LINE__);
 return authorizedBy.find(auth) != authorizedBy.end();
 }
 //-----------------------------------------------------------------------------
 return authorizedBy.find(auth) != authorizedBy.end();
 }
 //-----------------------------------------------------------------------------
+std::vector<std::string> USER_IMPL::GetAuthorizers() const
+{
+    std::vector<std::string> list;
+    std::transform(authorizedBy.begin(), authorizedBy.end(), std::back_inserter(list), std::mem_fun(&AUTH::GetVersion));
+    return list;
+}
+//-----------------------------------------------------------------------------
 void USER_IMPL::Connect(bool fakeConnect)
 {
 /*
 void USER_IMPL::Connect(bool fakeConnect)
 {
 /*