Results 1 to 2 of 2

Thread: Beginner Restrict Record Access To Authenticated User

  1. #1
    Junior Member
    Join Date
    Jan 2019
    Posts
    1

    Beginner Restrict Record Access To Authenticated User

    Hi,

    If I create multiple tables that include a "created_by" username field/column, is there a no code approach to allowing (1) user admin or someone in the role admin to see all records and (2) all other users to only see records where "created_by" = the currently logged in user?

    Thanks

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,372
    Blog Entries
    2
    Hi Colohog,

    You can use row level security.
    https://www.lianja.com/doc/index.php...rity_.28RLS.29

    with the username() function.
    https://www.lianja.com/doc/index.php/USERNAME()
    Last edited by barrymavin; 2021-05-11 at 01:15.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us