As we have seen in the previous couple of blogs, there is a possibility both creating permissions on the Ethereum Blockchain and implementing basic data governance protocolls as well. Now we try to combine the two approaches into an inheritance hierarchy to cover both approaches.
The simplest way is to define an inheritance hierarchy starting with the basic logging - governance functionalities.
As a second smart contract let we define a descendant of the Governance smart that implements only the access modifiers.
As the next descendant we define the administrative functions for giving access to a user. It is important to note that this functionality must already be set by the modifiers making sure that only accounts with the necessary right can set further rights. Considering governance, there is the possibility to monitor both the attempts of access and the succeed of access. It is realized by the AdminAccessRole input parameter in our example.
Last but not least, custom functions can be set by the necessary modifiers, both ensuring that only the account with a necessary right can access to the functionality and to make sure that both the access attempts and the successfully attempts are logged.