diff --git a/raddb/mods-config/sql/main/mssql/queries.conf b/raddb/mods-config/sql/main/mssql/queries.conf index c0b1b3dadb9e..e4a4ba8d778f 100644 --- a/raddb/mods-config/sql/main/mssql/queries.conf +++ b/raddb/mods-config/sql/main/mssql/queries.conf @@ -76,24 +76,16 @@ authorize_reply_query = "\ ORDER BY id" authorize_group_check_query = "\ - SELECT \ - ${groupcheck_table}.id,${groupcheck_table}.GroupName, \ - ${groupcheck_table}.Attribute,${groupcheck_table}.Value, \ - ${groupcheck_table}.op \ - FROM ${groupcheck_table},${usergroup_table} \ - WHERE ${usergroup_table}.Username = '%{SQL-User-Name}' \ - AND ${usergroup_table}.GroupName = ${groupcheck_table}.GroupName \ - ORDER BY ${groupcheck_table}.id" + SELECT id, GroupName, Attribute, Value, op \ + FROM ${groupcheck_table} \ + WHERE GroupName = '%{${group_attribute}}' \ + ORDER BY id" authorize_group_reply_query = "\ - SELECT \ - ${groupreply_table}.id, ${groupreply_table}.GroupName, \ - ${groupreply_table}.Attribute,${groupreply_table}.Value, \ - ${groupreply_table}.op \ - FROM ${groupreply_table},${usergroup_table} \ - WHERE ${usergroup_table}.Username = '%{SQL-User-Name}' \ - AND ${usergroup_table}.GroupName = ${groupreply_table}.GroupName \ - ORDER BY ${groupreply_table}.id" + SELECT id, GroupName, Attribute, Value, op \ + FROM ${groupreply_table} \ + WHERE GroupName = '%{${group_attribute}}' \ + ORDER BY id" group_membership_query = "\ SELECT groupname \ diff --git a/raddb/mods-config/sql/main/oracle/queries.conf b/raddb/mods-config/sql/main/oracle/queries.conf index e2d07a4100f0..3413b2e6b661 100644 --- a/raddb/mods-config/sql/main/oracle/queries.conf +++ b/raddb/mods-config/sql/main/oracle/queries.conf @@ -77,22 +77,16 @@ authorize_reply_query = "\ ORDER BY id" authorize_group_check_query = "\ - SELECT \ - ${groupcheck_table}.id, ${groupcheck_table}.GroupName, ${groupcheck_table}.Attribute, \ - ${groupcheck_table}.Value,${groupcheck_table}.op \ - FROM ${groupcheck_table}, ${usergroup_table} \ - WHERE ${usergroup_table}.Username = '%{SQL-User-Name}' \ - AND ${usergroup_table}.GroupName = ${groupcheck_table}.GroupName \ - ORDER BY ${groupcheck_table}.id" + SELECT id, GroupName, Attribute, Value, op \ + FROM ${groupcheck_table} \ + WHERE GroupName = '%{${group_attribute}}' \ + ORDER BY id" authorize_group_reply_query = "\ - SELECT \ - ${groupreply_table}.id, ${groupreply_table}.GroupName, ${groupreply_table}.Attribute, \ - ${groupreply_table}.Value, ${groupreply_table}.op \ - FROM ${groupreply_table}, ${usergroup_table} \ - WHERE ${usergroup_table}.Username = '%{SQL-User-Name}' \ - AND ${usergroup_table}.GroupName = ${groupreply_table}.GroupName \ - ORDER BY ${groupreply_table}.id" + SELECT id, GroupName, Attribute, Value, op \ + FROM ${groupreply_table} \ + WHERE GroupName = '%{${group_attribute}}' \ + ORDER BY id" ####################################################################### # Group Membership Queries