Setup online_users view permissions

Head over to the Permissions tab under online_users view to add relevant permissions.

Select permission

Here in this view, we only want the user to be able to select data and not do any mutations. Hence we don't define any permission for insert, update or delete.

For Row select permission, choose Without any checks and under "Column select permission", choose both the columns id and last_seen.

online users permission

Click on Save Permissions. You have completed all access control rules required for the realtime todo app.

Did you find this page helpful?
Start with GraphQL on Hasura for Free
  • ArrowBuild apps and APIs 10x faster
  • ArrowBuilt-in authorization and caching
  • Arrow8x more performant than hand-rolled APIs
Promo
footer illustration
Brand logo
© 2024 Hasura Inc. All rights reserved
Github
Titter
Discord
Facebook
Instagram
Youtube
Linkedin