This diff essentially handles the edit role workflow on web, where the permission enum options will be pre-selected if previously selected. The logic is similar to what was done in D8524 on `native`
[[ https://linear.app/comm/issue/ENG-4430/push-the-create-role-modal-with-prepopulated-fields-when-edit-role-is | ENG-4430 ]]
Depends on D8623