1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2024-12-25 19:23:23 +01:00

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

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 = `