Doc admin filter

Hello,

I made my doc for interact only and with a specific people for doc admin.
I would like to make a formula that filter a table based on a people column. if the user is an admin doc he can see all otherwise there is a filter on the current user.

I wonder if we can find the list of the doc admin somewhere ? I do not see the properties of the docs in formulas :frowning:

ps : I found a workaround that is not nice

Hey @Alexandre_Husset ,
as far as I know, you can not access the doc admin status inside the doc. You can get the “Doc user”.state but as I understand it only shows what you have set in the doc sharing options, not if the User is a Maker.

The way I achieve what you want is by seperating the official Codas doc permissions from my own set up permissions in the doc.

You can do that by creating a table “users” where you list all your users and have a column with the Coda User to connect them. Add another column and set up the “doc permissions” for each user. I use the “Team” column for that in the example, and it’s even multi-select.

In the team column, a user can be an admin, finance, design, website, …

You can now filter any table based on the current Coda users specific row and his permissions.

E.g. I made myself a formula that reads the permissions of the current user (called CurrentRights & returns a list) and on the respective tables I filter by checking if the needed permissions are included :


Now the content of this table can be seen by the Website team and Admins.

But you really have to make sure that all important parts and the canvas is locked and no one can play around with filters or permissions.

Disclaimer
I have tested to hack this by myself and was not able to, as long as locking is set up properly. I also tried to get the data via network tab, local storage, … but did not found the filtered results. So for my not-so-sensitive-data, this is totally fine. There might still be ways to hack around this, depending on how the filtering works under the hood. If someone knows how secure this is, it’s probably @Paul_Danyliuk .

Best,
Daniel

2 Likes

thanks @Daniel_Stieber that’s the workaround I did for the moment.
I will continue to investigate a little on this I tell you if I find something

@Alexandre_Husset
I also use User specific filtering which can be combined with this easily. So I don’t even see it as a workaround, but more as a feature. If you only want to hide stuff from non admins, its maybe one step more than you need. Also then it will be easier to just filter by “if user is not admin a or admin b” instead of creating a table to maintain every user. Depending on how many makers you have of course.

1 Like