How to bring current record into canAccess() method code?
I managed to restrict the access to the edit user page with this code:
and it works.
However, I need a bit more custom logic that uses some values from the record I am trying to access.
And I am unable to use
I am getting this error:
Any idea how to access the record inside canAccess() method?
and it works.
However, I need a bit more custom logic that uses some values from the record I am trying to access.
And I am unable to use
$this->getRecord() inside the code like:I am getting this error:
Using $this when not in object contextAny idea how to access the record inside canAccess() method?