initial
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
-- ============================================================================
|
||||
-- Allow admins to UPDATE any profile row. Needed for the admin UI to ban,
|
||||
-- block-from-inviting, or promote users. `current_user_is_admin()` already
|
||||
-- exists from the initial schema.
|
||||
-- ============================================================================
|
||||
|
||||
drop policy if exists profiles_update_admin on public.profiles;
|
||||
create policy profiles_update_admin on public.profiles
|
||||
for update to authenticated
|
||||
using (public.current_user_is_admin())
|
||||
with check (public.current_user_is_admin());
|
||||
Reference in New Issue
Block a user