416 questions
1
vote
0
answers
43
views
Database error when updating user row in Supabase with RLS, denied despite correct user_id?
(btw im not anywhere near a professional with this stuff) I'm encountering a database error when trying to UPDATE a user row in my Supabase/Postgres app that uses Row-Level Security (RLS). When I ...
0
votes
0
answers
38
views
Supabase upsert in React Native profile table not updating onboarding_completed
I'm building a mobile app with React Native (Expo) and using Supabase for authentication and user profiles.
This is my profiles table
create table public.profiles (
id uuid primary key references ...
0
votes
1
answer
64
views
Supabase RLS: Anonymous INSERT into reviews returns 401 while authenticated INSERT works (campaign_id active, policies correct)
I’m facing a strange Supabase RLS issue that I can’t resolve after days of debugging.
I have a public review flow:
Users should be able to submit reviews without logging in (anonymous users) and also ...
0
votes
0
answers
23
views
How to apply RLS based on username in Oracle Analytics Server (OAS 2025)?
I have a dataset that contains a username column. I want to filter BI visualizations automatically based on the logged-in user in Oracle Analytics Server (2025).
How can I implement RLS (Row Level ...
1
vote
4
answers
124
views
RLS usage on low-medium sized projects. +Security concerns [closed]
Consider this simple Row Level Security example:
CREATE TABLE accounts (
id integer PRIMARY KEY,
email text,
password text,
);
-- creating RLS policy
ALTER TABLE accounts ENABLE ROW LEVEL ...
0
votes
0
answers
60
views
How to Implement Row-Level Security (RLS) in Power BI with DirectQuery Dataset Embedded via .NET Core
I’m working on embedding a Power BI report that uses a DirectQuery dataset, and I want to implement Row-Level Security (RLS) through my .NET Core backend.
Setup Details:
Report Type: Power BI PBIX ...
1
vote
1
answer
435
views
Permission denied despite correct RLS, as supabase.auth.getUser() returns null on server
I'm building a Next.js 14 (App Router) application using Clerk for authentication and Supabase for the database. Despite following the latest integration guides, I'm stuck on a persistent 42501 ...
1
vote
0
answers
108
views
Getting permission denied to rls policy in Redshift
I have an employee table which has data for all region and countries. As an admin, I want to enable RLS on this table so that the end user can only view the data he is allowed to. The access ...
1
vote
1
answer
220
views
Supabase: Getting "role 'user' does not exist" error only when authenticated user queries product/category tables
Supabase: Getting "role 'user' does not exist" error only when authenticated user queries product/category tables
Problem Summary
I'm experiencing a strange issue with Supabase where:
When ...
3
votes
0
answers
100
views
How to text-search in PostgreSQL when using RLS?
Over the past week, I’ve been working on implementing text search in a NestJS application using PostgreSQL. The challenge is that the app supports multiple tenants, all sharing the same tables, so we ...
0
votes
0
answers
197
views
Supabase Storage RLS Violation Despite Correct Policy Check?
I'm encountering a persistent RLS violation when trying to upload files to Supabase Storage using the JS client (supabase-js). The goal is to allow only authenticated users listed in a public.admin ...
0
votes
0
answers
113
views
PowerBI : Retrieve row level security (RLS) with Powershell
In PowerBI, we have multiple reports with row level security roles.
I need a PowerShell script for retrieving those.
Here what I have tried, issue is that /roles does not exist. Does anyone have a ...
0
votes
0
answers
116
views
Supabase Auth + RLS: Users Authenticated but Failing to Insert Rows via Web App
I'm using Supabase Auth for user authentication and have a PostgreSQL schema with Row-Level Security enabled. Users are able to log in through my React web app without any issues. However, when they ...
0
votes
0
answers
24
views
How to compare substring to userprinciplename substring?
I'm trying to create RLS that will compare user1 with user1 because the domains are different. So if email is [email protected] and userprinciplename() [email protected], that should match.Some of the ...
0
votes
1
answer
210
views
supabase_flutter does not allow anon UPSERT with "new row violates row-level security policy" error even though anon RLS policies seem to be set right
I have a Supabase table named "users" that contains a unique key column (text) named "id_rc1" and another column named "version" (text), among other fields all of which ...
0
votes
0
answers
32
views
Supabase authentication Error 42501- Python
def save_user_pdfs(user_id, pdf_name, pdf_hash, extracted_text, summary):
print(f"Saving PDF for user_id: {user_id}") # Debugging
if not user_id:
print("Error: user_id ...
0
votes
0
answers
48
views
PowerBI row level security integration
RLS in Power BI Causing Blank Data – Need Help Debugging
Issue Summary
Applying Row-Level Security (RLS) in Power BI causes all data to go blank when testing with "View As Role" in Power BI ...
0
votes
0
answers
162
views
Supabase Storage & RLS: JWT Role Not Recognized, Permission Denied Errors
I am new to Supabase and trying to set up a private storage bucket where only users with an "Admin" role in their JWT can upload and manage files.
I’ve created the necessary policies, roles, ...
0
votes
0
answers
83
views
Power BI Security Manage Roles Issue
DAX expression used to be:
[Email] = USERPRINCIPALNAME() || [Manageremail] = USERPRINCIPALNAME()
Due to the company's changed name, @xy.com has changed to @zw.com.
People still log in with the xy.com, ...
1
vote
1
answer
59
views
Prevent user from manipulating subset of columns by RLS on view with no RLS on table
I want to use use VIEWS for column security. db<>fiddle
create table users(user_id, first_name, create_time)as values
(1, 'Adam', 'yesterday'::timestamptz)
, (2, 'Bob' , 'today');
create ...
1
vote
1
answer
88
views
How do I insert into a table with RLS and get the ID back before I have the record linked to the user?
Using Supabase/Postgres, I have 3 tables. auth.users, public.boards, and public.user_boards.
When a user creates a new board, I need to insert a record into public.boards and return the id so that I ...
0
votes
1
answer
296
views
USERELATIONSHIP() error with RLS recently?
I have a Power BI report that's been up for months, with no problem.
Last Monday (20/01/2025), suddenly, some of the visuals are giving me the USERRELATIONSHIP() error.
The UseRelationship() and ...
0
votes
1
answer
184
views
How do I implement email subscriptions for paginated reports in powerbi service?
I want to figure out the best method to create email subscriptions for those reports for people in different regions and departments
0
votes
0
answers
81
views
Multi-tenant Rust diesel + PostgreSQL without tenant_id in each model
I'm developing a multi-tenant app using Rust (diesel as its DB driver) and PostgreSQL. I've decided to use Row Level Security in PostgreSQL to enforce data isolation in the DB layer rather than having ...
1
vote
0
answers
186
views
Supabase - new row violates row-level security policy
I have created a simple app with vue.js frontend and an express.js backend. It has a login that works properly and in the databse I can see one user and his ID. I have enabled row level security for ...
0
votes
1
answer
159
views
PostgreSQL privilege, setting or feature to limit number of rows a user can select
Using PostgreSQL, is it somehow possible to restrict the SELECT privilege of a certain user so that he can only select a certain limited number of rows from a certain table?
For example, user joe ...
0
votes
0
answers
111
views
Row-Level Security in Visual Studio 2022 Tabular Modeling Not Working
I'm adding row-level security to a tabular model using Visual Studio. The data will be processed and stored in Azure and analyzed in Excel. Somehow, I'm not sure how yet, the Azure component means ...
1
vote
1
answer
199
views
How to restrict RLS on certain column(s) in PostgreSQL/Supabase?
Lets say you have a Supabase database with the following entity:
type Game = {
id: number | null;
is_finished: boolean;
points: number;
};
Authenticated users should be able to change the ...
1
vote
1
answer
346
views
How to properly implement an RLS policy for a many-to-many relationship?
I have a trips table and a users table, along with a trip_user junction table to handle the many-to-many relationship of the trips and users table.
I want to implement an RLS policy that only allows ...
0
votes
2
answers
108
views
Postgres RLS update conditions not met when column RLS relies on is updated
I have a Postgres Database with a single table profile in it. This table has two columns, an id and a username. I've enabled RLS and have applied the following policies.
schemaname | tablename | ...
0
votes
1
answer
64
views
Postgres create policy concurrently
I have a postgres table already has row level security enabled, with policy for role1. I want to create another policy for role2. However, when I run
CREATE POLICY policy_name ON {table} AS PERMISSIVE ...
0
votes
1
answer
1k
views
How to setup RLS filter in Superset for dynamic data
I have a simple table in DB with 2 columns, name and phone.
"Sachin" "9988776655"
"Ramesh" "1988776655"
"Jadeja" "2988776655"
"...
3
votes
1
answer
192
views
Postgres Permissions violated by before-insert trigger function
I've got a table with row level permissions enabled. I've got an insert policy for my user, and I've granted permissions for them on specific columns. I added a new column to track the id of whoever ...
0
votes
1
answer
392
views
How to get error reporting for Supabase RLS violations?
I am using Supabase's RLS to control which users can delete certain records in the database. The records are associated with files in a bucket that will get deleted too. I expect that if the Supabase ...
1
vote
1
answer
256
views
Apply RLS to a calculated table
I have the following calculated table :
MyCalculatedTable =
DISTINCT (
SELECTCOLUMNS (
FILTER (
'Dim A',
LEFT('Dim A'[Group],1) = "B" &&
...
1
vote
1
answer
68
views
Prevent self-referencing relation in SurrealDB
I am trying to apply the table permissions system SurrealDB offers to enable row-level security in its tables, but am seeming to fail with a simple example:
DEFINE TABLE node SCHEMAFULL TYPE NORMAL;
...
3
votes
0
answers
321
views
How to Hide Filters Based on Row-Level Security (RLS) in Apache Superset 4.0?
I'm using Apache Superset 4.0 and have implemented Role-Based Access Control (RBAC) and Row-Level Security (RLS) to manage data access for different user roles. However, I want to hide specific ...
1
vote
0
answers
118
views
Row-level security with session_context doesn't work after refreshing token
I have a multi-tenant database, I use Row-level security to filter/block data for every table. Every time someone queries the table, they need to set up the session context. I have a API set up where ...
0
votes
1
answer
427
views
How to apply RLS to other dimensions when using the static RLS approach?
I have 4 tables. Sales, Customers, Products, Brand. The data model is a standard star schema design.
There are 3 Customers in the Customers table, for example: Walmart, Starbucks, Kellogs.
Customer's ...
0
votes
1
answer
586
views
Postgres with row level security does not optimize queries / uses one-time filters
It seems that postgres with enabled row level security on a table cannot properly optimize queries. The following example sql demonstrates the issue:
begin transaction;
-- create demo table
...
0
votes
2
answers
120
views
Row level security policy not working when checking the same table
I have two users: alice and bob.
I have one organization: contoso.
Alice is member of contoso.
What I want is for alice to be able to add bob as member of contoso since alice is member of contoso. I ...
0
votes
0
answers
50
views
Need a PostgreSQL RLS policy for employees to see posts
I am using Supabase and PostgreSQL and have a number of tables as below:
Table 1: user_roles:: id, created_at, user_id, role_id
Table 2: roles:: id, created_at, role_name
id 1 >> admin
id 2 >...
1
vote
1
answer
115
views
In Azure Data Explorer how do I parametrize metadata to be used in Row Level Security function in a query optimized way
My timeseries table T has the columns: location, sensor_id, timestamp and value. The table has thousands of sensor_id, billions of values per year and about 100 locations. The 100 locations are in 6 ...
0
votes
1
answer
381
views
Row-level security in SQL server
In this scenario, I seek assistance in implementing row-level permissions for a table named 'user' with columns 'username' and 'role'. The objective is to establish a security model where access to ...
1
vote
1
answer
778
views
How do I use Supabase Realtime database with RLS and a custom JWT?
I am having trouble getting realtime data from my Supabase database when using Row level security (RLS) and a custom JWT.
When getting data from the database normally things work as expected, but when ...
1
vote
0
answers
316
views
Row level security on select statement to select multiple rows from two tables
I have only used Postgres briefly, so still trying to learn.
I have 3 tables, "users", "teams" and then to connect users to multiple teams "users_teams".
users
...
0
votes
1
answer
327
views
Design Row level access in a Azure SQL database
I have a requirement to create new SQL database with close to around 10 tables including all fact and dimention tables. This database stores the data for several users from several partner companies.
...
2
votes
1
answer
302
views
DAX RLS Function using LOOKUPVALUE Parsing but not working
I have a table that I'm trying to implement RLS on using a secondary table with a structure below:
EmployeeTable
EmployeeID
EmployeeEmail
1
[email protected]
2
[email protected]
FilterTable
EmployeeID
...
0
votes
2
answers
405
views
Snowflake: how to securely share Snowsight worksheets & dashboards for data with row-level security
What would be the best way to enable users to share Snowsight worksheets & dashboards for data with row-level security/row access policies?
It seems like sharing a worksheet would be dangerous ...
2
votes
0
answers
85
views
Get embedded url of pbix power bi report that has paginated rdl report inside it
When I get the embedded url of pbix report that has the paginated rdl report in it and load it in an iframe the pbix report is visible but the paginated report is not show. The paginated report has ...