Fixed missing permissions checks.