Skip to content

Commit

Permalink
Correct group attribute queries
Browse files Browse the repository at this point in the history
  • Loading branch information
ndptech committed Oct 11, 2024
1 parent efa885e commit 4d8673e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 30 deletions.
24 changes: 8 additions & 16 deletions raddb/mods-config/sql/main/mssql/queries.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
22 changes: 8 additions & 14 deletions raddb/mods-config/sql/main/oracle/queries.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4d8673e

Please sign in to comment.