add in the edit permissions check