can() public method
Checks if the user can perform the operation as specified by the given permission. Note that you must configure "authManager" application component in order to use this method. Otherwise it will always return false.
public boolean can ( $permissionName, $params = [], $allowCaching = true )$permissionName string
The name of the permission (e.g. "edit post") that needs access check. $params array
Name-value pairs that would be passed to the rules associated with the r