why not `@user.admin = Gitlab.config.ldap.admin_gids.include?(gid)` ? It would save you 4 lines. ;)