Jake
11/21/2022, 2:05 PMcostap
11/21/2022, 2:22 PMJoey
11/21/2022, 3:09 PMJoey
11/21/2022, 3:10 PMamir.badar
11/21/2022, 3:10 PMamir.badar
11/21/2022, 3:10 PMJoey
11/21/2022, 3:10 PMSingha1
11/21/2022, 3:13 PMamir.badar
11/21/2022, 3:16 PMJake
11/21/2022, 3:16 PMJoey
11/21/2022, 3:20 PMJoey
11/21/2022, 3:25 PMcostap
11/21/2022, 3:43 PMJoey
11/21/2022, 3:44 PMSHOW track_commit_timestamp
will indicate whether they are enabledJoey
11/21/2022, 3:45 PMcostap
11/21/2022, 4:02 PMSingha1
11/21/2022, 4:13 PMwilliamdclt
11/21/2022, 4:17 PMsql
SELECT namespace, object_id, relation, userset_namespace, userset_object_id, userset_relation, created_transaction, deleted_transaction
FROM relation_tuple
WHERE created_xid IS NULL
LIMIT 1000 FOR UPDATE;
Query plan (EXPLAIN ANALYZE):
sql
Limit (cost=0.00..68.34 rows=1000 width=150) (actual time=468.112..472.134 rows=1000 loops=1)
-> LockRows (cost=0.00..479050.71 rows=7009496 width=150) (actual time=468.111..472.023 rows=1000 loops=1)
-> Seq Scan on relation_tuple (cost=0.00..408955.75 rows=7009496 width=150) (actual time=468.097..468.493 rows=1000 loops=1)
Filter: (created_xid IS NULL)
Rows Removed by Filter: 2947393
Planning Time: 0.105 ms
Execution Time: 472.248 ms
The index on created_xid IS NULL
isn't used 🤔 Even after an ANALYZE
. No idea why.Singha1
11/21/2022, 5:30 PMSingha1
11/21/2022, 5:52 PMSingha1
11/21/2022, 5:52 PMSingha1
11/21/2022, 5:52 PMJoey
11/21/2022, 5:57 PMJoey
11/21/2022, 5:57 PMSingha1
11/21/2022, 6:10 PMSingha1
11/21/2022, 6:10 PMSingha1
11/21/2022, 6:11 PMJoey
11/21/2022, 6:31 PMSingha1
11/21/2022, 6:48 PMJonathan Hope
11/21/2022, 7:47 PMdefinition account {
relation account_admin: user
permission read = account_admin
}
Can I get the all of the accounts that a user has read permission for. I've tried this:
const response = await client.lookupResources(
LookupResourcesRequest.create({
resourceObjectType: 'account',
permission: 'read',
subject: SubjectReference.create({
object: user,
}),
}),
);
But the permissionship comes back as 0. I believe that means that I can't reliably say that the user has read permission for the the accounts that are returned.