© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
S
Supabase
•
14mo ago
•
39 replies
Geo⭐
Storage RLS not working when querying a table in public
Hello
,
I
've setup successfully RLS on my tables
, but when I try to configure it on my buckets
, it doesnt work
.
I have a table named
roles
where i store users
' auth id
(column user
_id
)
, and the team
_id
.
If I bullt the RLS policy hardcoding the team
_id it works
, like this example
(
(bucket
_id
=
'media
'
) AND
(
'00001
'
=
(storage
.foldername
(name
)
)
[1
]
)
)
but when i try to retrieve the team
_id from the roles table
, it fails
:
bucket
_id
=
'media
' AND
EXISTS
(
SELECT 1
FROM roles
WHERE user
_id
= auth
.uid
(
)
AND team
_id
=
(storage
.foldername
(name
)
)
[1
]
)
FYI
: my supabase instance its self
-hosted in docker
Thanks you in advance and happy holidays
Supabase
Join
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
Storage RLS Template not working
S
Supabase / help-and-questions
13mo ago
RLS not working on my roles table
S
Supabase / help-and-questions
4y ago
#help Table public.companies is public, but RLS has not been enabled.
S
Supabase / help-and-questions
2mo ago
RLS policy 'in' not working
S
Supabase / help-and-questions
4y ago