Skip to content

Commit

Permalink
governance rules order (#1475)
Browse files Browse the repository at this point in the history
* Keep order of governance rules

Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>

* Uncrustify

Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>

* Readers and writers have the same governance rules

Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>

* regression test

Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>

* uncrustify

Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
  • Loading branch information
IkerLuengo authored Oct 21, 2020
1 parent a7af89a commit 389e7d1
Show file tree
Hide file tree
Showing 9 changed files with 769 additions and 284 deletions.
39 changes: 21 additions & 18 deletions src/cpp/security/accesscontrol/AccessPermissionsHandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,33 @@ namespace security {

class AccessPermissions
{
public:
public:

AccessPermissions() : store_(nullptr), there_are_crls_(false) {}
AccessPermissions()
: store_(nullptr)
, there_are_crls_(false)
{
}

~AccessPermissions()
~AccessPermissions()
{
if (store_ != nullptr)
{
if(store_ != nullptr)
{
X509_STORE_free(store_);
}
X509_STORE_free(store_);
}
}

static const char* const class_id_;
static const char* const class_id_;

X509_STORE* store_;
std::string sn;
std::string algo;
bool there_are_crls_;
PermissionsToken permissions_token_;
PermissionsCredentialToken permissions_credential_token_;
ParticipantSecurityAttributes governance_rule_;
std::map<std::string, EndpointSecurityAttributes> governance_reader_topic_rules_;
std::map<std::string, EndpointSecurityAttributes> governance_writer_topic_rules_;
Grant grant;
X509_STORE* store_;
std::string sn;
std::string algo;
bool there_are_crls_;
PermissionsToken permissions_token_;
PermissionsCredentialToken permissions_credential_token_;
ParticipantSecurityAttributes governance_rule_;
std::vector<std::pair<std::string, EndpointSecurityAttributes>> governance_topic_rules_;
Grant grant;
};

typedef HandleImpl<AccessPermissions> AccessPermissionsHandle;
Expand Down
Loading

0 comments on commit 389e7d1

Please sign in to comment.