replace permission field in type field