Deduplicate permission UI code
Only show 'synced' column for existing users

It's not useful for users that haven't been saved yet - they can't have a
synced status.
Gracefully handle no file being selected

The parameter was missing if no file was selected, so we got a nil pointer
error.