Added Pundit policy check for showing edit controls