user.Manager: fix ACL write, read order

This should fix "read-only access to topic *" being applied before "read-write access to topic _PREFIX_*"
Before this if we have:

ntfy access user "mytopic*" rw
ntfy access user "*" ro

read-only access rule was applied first and user couldn't write to
mytopic*
This commit is contained in:
Nikolay Zlatev 2023-10-13 15:41:17 +03:00
parent b7f37138f8
commit 5c9cebf059
1 changed files with 1 additions and 1 deletions

View File

@ -161,7 +161,7 @@ const (
FROM user_access a
JOIN user u ON u.id = a.user_id
WHERE (u.user = ? OR u.user = ?) AND ? LIKE a.topic ESCAPE '\'
ORDER BY u.user DESC
ORDER BY u.user DESC, a.write DESC
`
insertUserQuery = `