A simple contains with user()


I am still rather new to Coda and ran into something today, which is most likely easy but I just don’t get my head around it:

I am trying to set up some simple user management and for that purpose, I have some functions which I only myself want to be able to execute. For that I have started to set up a button, in which I hardcode the comparison between my login and the user() function:

The “Disable If” function on the button looks like this:

However, I am currently logged in with following user:

login Coda

The login contains imho the search string - however, it keeps on saying “false” for the current login, while it should be true, right?

Any help is highly appreciated!

If you want to disable a button for anyone but yourself, do something like this:

User()!= ___________

In the blank you need to start typing the @ symbol and it will pull up a list of users, then select yourself.

There are other ways to accomplish this and create more advanced user permissions (like setting up a table with a people column, assigning roles, and then writing disable criteria off info from that table), but if you are simply trying to disable buttons for all but yourself, what I wrote above should do the trick!


That did the trick - thank you!

1 Like