comparison pkg/controllers/importqueue.go @ 5108:89639e02cff0 queued-stage-done

Do not show internal review jobs to users
author Tom Gottfried <tom@intevation.de>
date Wed, 25 Mar 2020 12:45:56 +0100
parents 66270586031a
children c0ceec7e6f85
comparison
equal deleted inserted replaced
5107:b0d29f0aae3b 5108:89639e02cff0
118 l = append(l, term) 118 l = append(l, term)
119 a = append(a, term) 119 a = append(a, term)
120 b = append(b, term) 120 b = append(b, term)
121 } 121 }
122 122
123 // Always filter review jobs. They are only for internal use.
124 cond(` NOT kind LIKE $%d `, `%#review`)
125
123 if query := req.FormValue("query"); query != "" { 126 if query := req.FormValue("query"); query != "" {
124 query = "%" + query + "%" 127 query = "%" + query + "%"
125 cond(` (kind ILIKE $%d OR username ILIKE $%d OR signer ILIKE $%d OR `+ 128 cond(` (kind ILIKE $%d OR username ILIKE $%d OR signer ILIKE $%d OR `+
126 `id IN (SELECT import_id FROM import.import_logs WHERE msg ILIKE $%d)) `, 129 `id IN (SELECT import_id FROM import.import_logs WHERE msg ILIKE $%d)) `,
127 query, query, query, query) 130 query, query, query, query)