 grant delete on table sg_public.follow to sg_user, sg_admin;
 create policy delete_follow on sg_public.follow
   for select to sg_user, sg_admin
-  using (user_id = current_setting('jwt.claims.user_id')::uuid);
+  using (user_id = current_setting('jwt.claims.user_id')::uuid); -- TODO comment
 
 -- Select notice: user or admin self.
 grant select on table sg_public.notice to sg_user, sg_admin;
 create policy select_notice on sg_public.notice
   for select to sg_user, sg_admin
-  using (user_id = current_setting('jwt.claims.user_id')::uuid);
+  using (user_id = current_setting('jwt.claims.user_id')::uuid); -- TODO comment
 
 -- Insert notice: none.
 

grant update on table sg_public.user to sg_user, sg_admin;
create policy update_user on sg_public.user
  for update (name, view_subjects) to sg_user
  using (id = current_setting('jwt.claims.user_id')::uuid);
create policy update_user_admin on sg_public.user
  for update to sg_admin
  using (true);

-- Delete user: user self, or admin.
grant delete on table sg_public.user to sg_user, sg_admin;
create policy delete_user on sg_public.user
  for delete to sg_user
  using (id = current_setting('jwt.claims.user_id')::uuid);
create policy delete_user_admin on sg_public.user
  for delete to sg_admin
  using (true);

-- All users may log in or check the current user.
grant execute on function sg_public.log_in(text, text) to sg_anonymous, sg_user, sg_admin;

grant delete on table sg_public.suggest_follower to sg_user, sg_admin;
create policy delete_suggest_follower on sg_public.suggest_follower
  for delete to sg_user, sg_admin
  using (id = current_setting('jwt.claims.user_id')::uuid); -- TODO comment

-- TODO other functions...
