Commit 4c8d6e26 authored by Jan Möbius's avatar Jan Möbius
Browse files

Use Security Interface if available in PluginLoader

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6646 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 55f10164
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
#include "OpenFlipper/BasePlugin/FileInterface.hh" #include "OpenFlipper/BasePlugin/FileInterface.hh"
#include "OpenFlipper/BasePlugin/RPCInterface.hh" #include "OpenFlipper/BasePlugin/RPCInterface.hh"
#include "OpenFlipper/BasePlugin/ScriptInterface.hh" #include "OpenFlipper/BasePlugin/ScriptInterface.hh"
// #include "OpenFlipper/BasePlugin/SecurityInterface.hh" #include "OpenFlipper/BasePlugin/SecurityInterface.hh"
#include "OpenFlipper/INIFile/INIFile.hh" #include "OpenFlipper/INIFile/INIFile.hh"
...@@ -402,26 +402,22 @@ void Core::loadPlugin(QString filename, bool silent){ ...@@ -402,26 +402,22 @@ void Core::loadPlugin(QString filename, bool silent){
return; return;
} }
// //Check if it is a BasePlugin //Check if it is a BasePlugin
// SecurityInterface * securePlugin = qobject_cast< SecurityInterface * >(plugin); SecurityInterface * securePlugin = qobject_cast< SecurityInterface * >(plugin);
// if ( securePlugin ) { if ( securePlugin ) {
// emit log(LOGINFO,"Plugin uses security interface. Trying to authenticate against plugin ..."); emit log(LOGINFO,"Plugin uses security interface. Trying to authenticate against plugin ...");
//
// QMetaObject::invokeMethod(plugin,"authenticate" ) ; bool success = false;
// QMetaObject::invokeMethod(plugin,"authenticate", Q_RETURN_ARG( bool , success ) ) ;
// std::cerr << "2" << std::endl;
// if ( success )
// securePlugin->authenticate(); emit log(LOGINFO,"... ok. Loading plugin ");
// else {
// if ( true ) emit log(LOGERR,"... failed. Plugin access denied.");
// emit log(LOGOUT,"=============================================================================================");
// emit log(LOGINFO,"... ok. Loading plugin "); return;
// else { }
// emit log(LOGERR,"... failed. Plugin access denied."); }
// emit log(LOGOUT,"=============================================================================================");
// return;
// }
// }
emit log(LOGOUT,"Plugin Desciption :\t\t " + basePlugin->description()); emit log(LOGOUT,"Plugin Desciption :\t\t " + basePlugin->description());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment