fix attr_encrypted in EE

Merged James Lopez requested to merge fix/attr-encrypted-ee-issue into master

Same MR as https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4963/ for CE - but EE has some extra attributes missing.

Fixes #19073