Add permissions checking