Are you using our SaaS platform (Baserow.io) or self-hosting Baserow?
SaaS
What do you need help with?
I have parts of my application builder app that would require a login to submit form information. I have a separate table for those users. How can I have those users appear in the “created by” and “edited by” fields instead of “members”, which are those who have access to the workspace?
I can’t get this to work. The first time I did it, it put a 0 in the created by section (instead of a name). However, the user I submitted it under was id 34. To elaborate even further, nothing was being inserted into any linked field. I created a plain text field, and the 0 showed up.
I also get an error when trying to submit the form, but when I take all the “user” stuff out of the submit button event, the form submits successfully, and the item shows up in the database.
I tried inserting the username instead, and nothing worked after that. I wanted to use the actual field type “created by” and “edited by” but instead of pointing it to the people who have access to the table (“Members”, which is ONLY me) , have it point to the user table I created for users to sign up and login to the “website”.
Either way, nothing is working. I even tried adding shared data sources and data sources to that form page only. I tried making sure everything is linked between tables.
Maybe the issue is staying logged in. Currently, there is no indication whether a user is logged in or not. I have tried creating a menu element for this, but showing things to a logged-in/out user only works with entire pages, not elements/links.
I have also tried creating a profile where you can edit usernames, etc, but those links don’t work in the menu element. Anything “user” related is not working out for me and my project one bit.
Perhaps what I am trying to achieve with Baserow is not even feasible (which would be a wiki-type database where random people on the internet log in to add and edit data).
When you run an application in preview, the authenticated user is removed after a page refresh. This might be the reason that nothing works for you. When you publish the application, the authenticated user stays logged in.
Maybe your restore this template as a starting point: Car Dealership Inventory. It has nothing to do with a wiki page, but it shows how you can visualize the authenticated users in the menu and hide/show elements based on the logged in user.
I just found a Baserow video explaining these things, actually! I figured out the login/out buttons, which helped me set up a profile page.
As for the profile page, is there a way I can set it up so that a logged-in user can edit their own profile page, but not someone else’s?
Currently, I have it set up so that you have to be logged in to see an “Edit Profile” button, but I was wondering if any user who is logged in can see everyone’s edit button and edit someone else’s profile.
For example, you can navigate to a page by editing the number at the end of a URL. Could “user 3” edit the end of the URL (/editprofile34, for example) and edit user 34’s profile?
If you pass the id of the user as a parameter, it can indeed be changed. A beter approach is not passing it as a parameter, but creating a data source that gets the authenticated user and use that data source to show the profile and edit it.
You can see an example of this in the Car Dealership template I mentioned earlier (Profile page). There is no parameter passed to that page, but a data source that gets the authenticated user.