Skip to content

Commit 3851dd2

Browse files
committed
[WIP] Remove default constructor for permission handler
This WIP commit is needed to find all places where the default constructor of the permission handler is used to identify newly added Init method is used to initialize the permission handler. Signed-off-by: Mykhailo Lohvynenko <[email protected]>
1 parent 36cb93f commit 3851dd2

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

include/aos/iam/permhandler.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ class PermHandlerItf {
9494
*/
9595
class PermHandler : public PermHandlerItf {
9696
public:
97+
/**
98+
* Constructs permission handler.
99+
*
100+
* @param uuidProvider UUID provider.
101+
*/
102+
explicit PermHandler(crypto::UUIDItf& uuidProvider);
103+
97104
/**
98105
* Initializes permission handler.
99106
*

src/iam/permhandler/permhandler.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ namespace aos::iam::permhandler {
1515
* Public
1616
**********************************************************************************************************************/
1717

18+
PermHandler::PermHandler(crypto::UUIDItf& uuidProvider)
19+
: mUUIDProvider {&uuidProvider}
20+
{
21+
LOG_DBG() << "Create permission handler";
22+
}
23+
1824
Error PermHandler::Init(crypto::UUIDItf& uuidProvider)
1925
{
2026
LOG_DBG() << "Init permission handler";

tests/iam/permhandler/permhandler_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class PermHandlerTest : public Test {
3535
}
3636

3737
crypto::DefaultCryptoProvider mCryptoProvider;
38-
PermHandler mPermHandler;
38+
PermHandler mPermHandler {mCryptoProvider};
3939
};
4040

4141
/***********************************************************************************************************************

0 commit comments

Comments
 (0)