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
$this->getRecord()
inside the code like:
I am getting this error:
Using $this when not in object context
Any idea how to access the record inside canAccess() method?2 Replies