I am currently working on a smart contract and using modifiers. I want to restrict access to a function only to a single account. I can do this with 'msg.sender' but to my knowledge this limits only to the account that deployed the contract. I want only the account 'web3.eth.accounts' to access the function. Is this possible in solidity?
Restricting access is a common pattern for contracts. Note that you can never restrict any human or computer from reading the content of your transactions or your contract’s state. You can make it a bit harder by using encryption, but if your contract is supposed to read the data, so will everyone else.
Take a look documentation https://solidity.readthedocs.io/en/v0.4.24/common-patterns.html#restricting-access