https://supabase.com/ logo
Join Discord
Powered by
# off-topic
  • h

    Huntedman

    01/05/2023, 7:41 PM
    I created a view on my RLS secured table.
    Copy code
    sql
    CREATE VIEW public.public_trainings AS
    SELECT
      id,
      published_at,
      required_read_permission
    FROM public.trainings;
    I was surprised that anon, and authenticated could do INSERT 😱😱😱 operations on the base table through this view. so I ended up doing
    Copy code
    sql
    REVOKE ALL ON public.public_trainings FROM anon, authenticated;
    GRANT SELECT ON public.public_trainings TO anon, authenticated;
    Is this enough to only allow select operations on the view? Are there any other roles jwt users could assume?
  • g

    garyaustin

    01/05/2023, 7:44 PM
    With Postgres15 you can now enforce RLS on views. Your question really belongs in #1006358244786196510 though if you want followup.
  • h

    Huntedman

    01/05/2023, 7:47 PM
    Thanks for the quick reply. I do understand that I can do RLS on views, but I essentially wanted to return "public" data for an underlying table. What made my jaw drop, was this blog post: https://supabase.com/blog/postgresql-views Like it says that you can use views for security, but fails to mention, that if you don't REVOKE permissions on the view, ANYONE can edit, insert, update the underlying data!
  • h

    Hosenur

    01/05/2023, 9:28 PM
    I hosted Supabase using the docker image, but I cant find the functions options, Is it not available ?
  • g

    garyaustin

    01/05/2023, 9:52 PM
    See the bottom of this https://supabase.com/docs/guides/resources/supabase-cli/local-development Please do any follow up in #1006358244786196510
  • z

    zetashift

    01/05/2023, 11:19 PM
    I wonder if there is an easier way to guide people to
    help
    , because it seems a significant amount of people ask their questions here
  • g

    garyaustin

    01/05/2023, 11:32 PM
    We have been discussing it, open to suggestions. We don't want to go back to the "wild wild west" though we had with all questions/help issues in a thread like this because it becomes impossible to know what has answers further down, etc. Discord seems to be investing time into developing the new forum style channel. Hopefully they add some sort of built in solved "button" as that would really help clean that up more.
  • z

    zetashift

    01/05/2023, 11:44 PM
    Completely understandable! I don't have any suggest currently other than maybe renaing chit-chat to offtopic
  • c

    coker

    01/06/2023, 3:18 AM
    Hello everyone, first time in this Discord. If I'm having trouble getting a really basic RLS policy set up, is the best place for that in #1006358244786196510 ? Or is there a better channel for that?
  • z

    zetashift

    01/06/2023, 3:29 AM
    that'd still be #1006358244786196510 !
  • c

    coker

    01/06/2023, 3:29 AM
    just checking, thanks!
  • z

    zetashift

    01/06/2023, 3:30 AM
    no worries, I think a lot of people have initial hurdles setting up RLS 😛
  • t

    themes.dev

    01/06/2023, 7:22 AM
    Is it not a security concern that a user's password can be updated without verifying the current password of the logged-in user? https://supabase.com/docs/reference/javascript/auth-updateuser
  • d

    Desmond

    01/06/2023, 9:45 AM
    Hi, I'm trying to query a table for all entries that were created_at a specific day, but I can't figure out how to do this. My current guess is
    client.from('table').select('*').eq('created_at::date','YYYY-MM-DD');
    where YYYY-MM-DD is a string. This, however, doesn't work. (Flutter/Dart)
  • d

    Desmond

    01/06/2023, 9:47 AM
    Another idea
    client.from('table').select('*').eq('created_at::year','YYYY').eq('created_at::month','MM').eq('created_at::day','DD');
    yields no result..
  • d

    Desmond

    01/06/2023, 10:27 AM
    Ah! Found it:
    client.from('table').select('*').gte('created_at','today()');
    gives the wanted result.
  • l

    Lewey

    01/06/2023, 3:13 PM
    moved to #1006358244786196510
  • s

    skiabox

    01/06/2023, 3:42 PM
    Hello friends!
  • s

    skiabox

    01/06/2023, 3:42 PM
    I want to create a remix run project and use supabase as a back end
  • s

    skiabox

    01/06/2023, 3:43 PM
    Do you think that I should also add a back-end framework in the stack like nest.js ?
  • s

    skiabox

    01/06/2023, 3:43 PM
    Or the combination of remix + supabase is enough ?
  • r

    RainZone

    01/06/2023, 10:36 PM
    Is it possible to upload an image to a storage and later display it without a user or using RLS? The image would be uploaded over an API-Route in NextJS. Could it work with a private key in my .env-file?
  • c

    cannap

    01/07/2023, 2:33 PM
    i learn supabase with a twitter clone and an edit button 😄 but i am damn slow since i worked with vue 2(pure js ) now switched to vue3(ts) XD
  • t

    thy

    01/07/2023, 3:27 PM
    would it be redundant to use supabase and django?
  • g

    Gregory

    01/07/2023, 5:22 PM
    Hello loving supabase so far, excited to collaborate here
  • z

    Zencep

    01/07/2023, 8:47 PM
    I just had a random question, not an issue with Supabase and it's not really something I need "help" with. I'm debating, should it be here or #1006358244786196510? I'm down with either.
    s
    • 2
    • 1
  • s

    silentworks

    01/07/2023, 9:43 PM
    I just had a random question not an
  • h

    honkstyle

    01/08/2023, 3:08 AM
    To a certain extent, but there are probably some things a backend is easier with
  • n

    nahtnam

    01/08/2023, 6:53 AM
    What is
    !hint
    and
    !inner
    ? I can't find docs for it anywhere
  • v

    Vik

    01/08/2023, 7:06 AM
    Super random question, what's your go-to dark mode color code? I've been using #121212
1...332333334...392Latest