add auto check and permission control to update/insert new item