update permission code