Added permissions checks