I am trying to create a smart contract or a combination of contracts thereof whereby one could set permissions to view variables that can be set in a contract on a private network.
Consider an account that has deployed a contract with 2 variables:
In addition lets say there are 2 functions:
These can be set by the caller of the contract calling the setDetails function which can set these variables to values passed in during the invocation of the function. They can be fetched by getDetails which provides the values of these variables.
At this point, lets say an address has set the variables to
name = John address = 1 Smith St.
How do I make sure other users/addresses calling the get function or reading the variables that have been set can retrieve the variable values only if they have the correct permissions?
I was following the Eris Industries based tutorials and noticed that permissions can be set for token transfer based on the fund manager example. Can this be extended to read variables that have been set by a previous interaction with the contract?