ImagingTools Core SDK
CSuperuserProviderComp.h
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ImtCore-Commercial
2#pragma once
3
4
5// ACF includes
6#include <icomp/CComponentBase.h>
7
8// ImtCore includes
9#include <imtbase/IObjectCollection.h>
10#include <imtauth/ISuperuserProvider.h>
11
12
13namespace imtauthdb
14{
15
16
17class CSuperuserProviderComp: public icomp::CComponentBase, virtual public imtauth::ISuperuserProvider
18{
19public:
20 typedef icomp::CComponentBase BaseClass;
21
22 I_BEGIN_COMPONENT(CSuperuserProviderComp);
23 I_REGISTER_INTERFACE(imtauth::ISuperuserProvider);
24 I_ASSIGN(m_userCollectionCompPtr, "UserCollection", "User collection", false, "UserCollection");
25 I_ASSIGN(m_superuserIdAttrPtr, "SuperuserId", "ID of the superuser", true, "su");
26 I_END_COMPONENT;
27
28 // reimplemented (imtauth::ISuperuserProvider)
29 virtual ExistsStatus SuperuserExists(QString& errorMessage) const override;
30 virtual QByteArray GetSuperuserId() const override;
31
32protected:
33 I_REF(imtbase::IObjectCollection, m_userCollectionCompPtr);
34 I_ATTR(QByteArray, m_superuserIdAttrPtr);
35};
36
37
38} // namespace imtauthdb
39
40
Authentication Database Persistence Layer Module.