put perms and flag in features