Skip to content

Commit dd32ba1

Browse files
committed
nit: natspec
1 parent 9d4755c commit dd32ba1

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/contracts/mixins/PermissionControllerMixin.sol

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,26 @@ abstract contract PermissionControllerMixin {
2525
}
2626

2727
/**
28-
* @notice Checks if the caller is allowed to call a function on behalf of an account.
29-
* @param account the account to check
30-
* @dev `msg.sender` is the caller to check that can call the function on behalf of `account`.
31-
* @dev Returns a bool, instead of reverting
28+
* @notice Checks if the caller (msg.sender) is permitted to call the current function on behalf of the given account.
29+
* @param account The account on whose behalf the function is being called.
30+
* @dev Reverts if the caller is not permitted to call the current function on behalf of the given account.
31+
* @dev This function queries the permissionController to determine if msg.sender is authorized
32+
* to call the current function (identified by msg.sig) on behalf of `account`.
3233
*/
3334
function _checkCanCall(
3435
address account
3536
) internal view {
3637
require(_canCall(account), InvalidPermissions());
3738
}
3839

40+
/**
41+
* @notice Checks if the caller (msg.sender) is permitted to call the current function on behalf of the given account.
42+
* @param account The account on whose behalf the function is being called.
43+
* @return allowed True if the caller is permitted, false otherwise.
44+
*/
3945
function _canCall(
4046
address account
41-
) internal view returns (bool) {
47+
) internal view returns (bool allowed) {
4248
return permissionController.canCall(account, msg.sender, address(this), msg.sig);
4349
}
4450
}

0 commit comments

Comments
 (0)