Are you using our SaaS platform (Baserow.io) or self-hosting Baserow?
Self-hosted
If you are self-hosting, what version of Baserow are you running?
Baserow version 1.35.0
If you are self-hosting, which installation method do you use to run Baserow?
Docker version 24.0.5, build ced0996
What are the exact steps to reproduce this issue?
I am using OSS version and was trying to make a column of type text
read-only. My table has certain fields like logs that I don’t my users to modify them. From the UI/frontend I don’t see any option so I tried modifying it using the API. Each field do have an read-only
parameter so I tried to update it but that doesn’t work. It gives me status 200
without doing the modification (see attached image). Please let me know if there is something wrong with my current approach or is there any alternative available?
Attach screenshots, videos, or logs that demonstrate the issue.
Hello @gaurang1745,
The read_only
property you’re seeing in the response originates from the field type itself, whether this field type as a whole is read-only or not.
update_database_table_field will provide you with more information on updating table fields, what you can send, and what you’ll be responded with.
Cheers,
Peter Evans
Hi @picklepete,
Okay so the system managed field like created_on
, last_modified
, modified_by
, etc only can be read_only
.
Is there any other way that I can disable column editing for the types like text
and long_text
? I don’t want user to change fields that contains logs and few other things.
Any messy work-around is also okay for me. I would like to keep the option of changing source code at the least priority.
Thnx
Hi @gaurang1745,
Unfortunately read-only
is not a valid type of field constraint at this time. Currently the only available constraint on a field is unique
.
I have updated the forum topic to be a feature request for review by the product team.
Hi @cwinhall
Yeah I checked constraints too but for now baserow only had one available constraint. The thing I wanted was to disable editing from the frontend but should be able to make changes via api. I made quick code changes to allow to make changes to read_only
, but that disabled the complete editing of the field, even via API!
Since this is not what I wanted, I added a new field to schema frontend_read_only
and made the changes to get desired results. This is a very primitive fix (probably messy) just to get my job done. As I was didn’t have any existing data, it was relatively simpler to implement.
I came to know that I can do this things in premium version by changing field permissions (read, edit) based on user but yeah I wanted something in OSS version since its very common use case. And we didn’t want spend so much as we had many customers and paying for each of them was a huge cost.
I would love to hear if there is any better alternative or implementation plan. I can do some development.
Also if you have raised gitlab feat request please mention here so I can track if baserow some day add official implementation of this feat.
Thnx