You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
org_id = json_extract(auth_json(), '$.attributes.org_id') AND
130
-
(json_extract(auth_json(), '$.attributes.role') = 'admin' OR owner_id = auth_userid())
137
+
(json_extract(auth_json(), '$.attributes.role') = 'admin' OR user_id = auth_userid())
131
138
```
132
139
133
-
**6. Access via a Membership Linking Table**
140
+
**7. Access via a Membership Linking Table**
134
141
135
142
```sql
136
143
-- SELECT policy
@@ -141,11 +148,11 @@ EXISTS (
141
148
)
142
149
```
143
150
144
-
**7. Public vs. Private Record Visibility**
151
+
**8. Public vs. Private Record Visibility**
145
152
146
153
```sql
147
154
-- SELECT policy
148
-
visibility = 'public' OR owner_id = auth_userid()
155
+
visibility = 'public' OR user_id = auth_userid()
149
156
```
150
157
151
158
With these policies, when a user executes a query, SQLite Cloud will automatically enforce the defined RLS rules, ensuring data security and compliance.
0 commit comments