1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-08 07:07:05 +02:00

* Fixed ACLRegistry for headless.

This commit is contained in:
Christian Muehlhaeuser
2012-06-08 20:00:41 +02:00
parent 53dd69e2f3
commit 13945286ac
2 changed files with 12 additions and 6 deletions

View File

@@ -26,10 +26,13 @@
#include "TomahawkApp.h" #include "TomahawkApp.h"
#include "Source.h" #include "Source.h"
#ifndef ENABLE_HEADLESS
#include "jobview/AclJobItem.h"
#include "jobview/JobStatusView.h"
#include "jobview/JobStatusModel.h"
#endif
#include "utils/Logger.h" #include "utils/Logger.h"
#include "jobview/AclJobItem.h"
#include "jobview/JobStatusView.h"
#include "jobview/JobStatusModel.h"
ACLRegistry* ACLRegistry::s_instance = 0; ACLRegistry* ACLRegistry::s_instance = 0;
@@ -124,6 +127,7 @@ ACLRegistry::isAuthorizedUser( const QString& dbid, const QString &username, ACL
return ACLRegistry::NotFound; return ACLRegistry::NotFound;
} }
#endif #endif
m_cache.append( user ); m_cache.append( user );
emit aclResult( dbid, username, user.acl ); emit aclResult( dbid, username, user.acl );
return user.acl; return user.acl;
@@ -131,6 +135,7 @@ ACLRegistry::isAuthorizedUser( const QString& dbid, const QString &username, ACL
#ifndef ENABLE_HEADLESS #ifndef ENABLE_HEADLESS
void void
ACLRegistry::getUserDecision( ACLRegistry::User user, const QString &username ) ACLRegistry::getUserDecision( ACLRegistry::User user, const QString &username )
{ {
@@ -138,7 +143,6 @@ ACLRegistry::getUserDecision( ACLRegistry::User user, const QString &username )
m_jobQueue.enqueue( job ); m_jobQueue.enqueue( job );
queueNextJob(); queueNextJob();
} }
#endif
void void
@@ -189,6 +193,8 @@ ACLRegistry::queueNextJob()
} }
} }
#endif
void void
ACLRegistry::load() ACLRegistry::load()

View File

@@ -86,13 +86,13 @@ public slots:
**/ **/
ACLRegistry::ACL isAuthorizedUser( const QString &dbid, const QString &username, ACLRegistry::ACL globalType = ACLRegistry::NotFound, bool skipEmission = false ); ACLRegistry::ACL isAuthorizedUser( const QString &dbid, const QString &username, ACLRegistry::ACL globalType = ACLRegistry::NotFound, bool skipEmission = false );
#ifndef ENABLE_HEADLESS #ifndef ENABLE_HEADLESS
void getUserDecision( ACLRegistry::User user, const QString &username ); void getUserDecision( ACLRegistry::User user, const QString &username );
#endif
private slots: private slots:
void userDecision( ACLRegistry::User user ); void userDecision( ACLRegistry::User user );
void queueNextJob(); void queueNextJob();
#endif
private: private:
/** /**