I want to write an EOS smart contract to manage users data. I need that only some admin account will able to add, update and delete users and the particular user can only update data. Can I check specific account authorization in a smart contract? And for update, can I check authorization of account either it should be admin or user? I am planning to set the primary key as each user account name. In this,
void insert(name user, std::string first_name, std::string last_name, std::string street, std::string city, std::string state) {
require_auth( user );
}
It is checking authorization of a particular user, but I need it for an admin account who is going to do all transactions. Any suggestions will be appreciated.