I have the function:
contract TaskContract {
function deleteTask(uint256 taskId, bool isDeleted) external {
if (taskToOwner[taskId] == msg.sender) {
tasks[taskId].isDeleted = isDeleted;
emit DeleteTask(taskId, isDeleted);
}
}
I know how to call other smart contract. My question is how to make sure that the contract calling the deleteTask() function has the necessary permissions to delete the task. How to rewrite function with if statement to check it. Any ideas ?
Thank you.