|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
#include "permissionservice.h"
|
|
|
|
|
#include "service.h"
|
|
|
|
|
#include <QCryptographicHash>
|
|
|
|
|
|
|
|
|
|
QList<QSharedPointer<Permission> > PermissionService::forPlugin(const QString &pluginId)
|
|
|
|
@ -54,6 +55,10 @@ QSharedPointer<User> PermissionService::loadUser(const QString &login)
|
|
|
|
|
auto admin = srvUser.all("login = '" + login + "'");
|
|
|
|
|
|
|
|
|
|
if (admin.count() == 1) {
|
|
|
|
|
Service<Role> srvRole;
|
|
|
|
|
for (auto& role : admin[0]->listRoles()) {
|
|
|
|
|
srvRole.load(role);
|
|
|
|
|
}
|
|
|
|
|
return admin[0];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|