--- a/mod_auth_jetbrains_hub.lua Sun Nov 03 03:45:47 2019 -0600
+++ b/mod_auth_jetbrains_hub.lua Sun Nov 03 04:01:02 2019 -0600
@@ -39,23 +39,11 @@
- -- we have at least one group, so output the start of our query
- for i, v in ipairs(hub_groups) do
- -- add the group making sure to quote it as spaces are allowed and will
- -- fail if they're not quoted.
- query = query .. "in:\"" .. v .. "\""
- -- if we have additional groups add our "or" separator between the
- if i < #hub_groups then
- query = query .. " or "
- -- finally add our closing paren and return the query
+ -- we have at least one group, so build the query that checks that the user + -- is in at least one of the groups. For example, if we groups was set to + -- {"admins", "users"} the results of this would be: + -- ' and (in:"admins" or in:"users")' + return " and (in:\"" .. table.concat(hub_groups, " or ") .. "\")" local group_query = get_group_query()