More scoping by user ID at DB level.
This commit is contained in:
+79
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "\n SELECT id, app_id, secret_hash, expires_at, created_at\n FROM user_app_secrets\n WHERE app_id IN (SELECT id FROM user_apps WHERE user_id = $1)\n AND app_id = $2\n ORDER BY created_at DESC, id DESC\n LIMIT $3\n OFFSET $4\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid",
|
||||
"origin": {
|
||||
"Table": {
|
||||
"table": "user_app_secrets",
|
||||
"name": "id"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "app_id",
|
||||
"type_info": "Uuid",
|
||||
"origin": {
|
||||
"Table": {
|
||||
"table": "user_app_secrets",
|
||||
"name": "app_id"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "secret_hash",
|
||||
"type_info": "Bytea",
|
||||
"origin": {
|
||||
"Table": {
|
||||
"table": "user_app_secrets",
|
||||
"name": "secret_hash"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "expires_at",
|
||||
"type_info": "Timestamptz",
|
||||
"origin": {
|
||||
"Table": {
|
||||
"table": "user_app_secrets",
|
||||
"name": "expires_at"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "created_at",
|
||||
"type_info": "Timestamptz",
|
||||
"origin": {
|
||||
"Table": {
|
||||
"table": "user_app_secrets",
|
||||
"name": "created_at"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid",
|
||||
"Uuid",
|
||||
"Int8",
|
||||
"Int8"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "1ad543cbedd620af3577784a64af86ce591b4e1cc695b286baff424d8032e3fb"
|
||||
}
|
||||
Reference in New Issue
Block a user