How to hide the Edit/Delete button based on user login?

https://www.youtube.com/watch?v=SV6u38Et0Fk. I cant seem to find an option to hide the buttons for users that I’m not logged in as.

Hi
Watching your video briefly, I can see taht you want to hide the form based on logged in user not matching the message creator.
You looked at Display filters, and only a few where available. Basically the filters here are the columns you are displaying.

I suggest you add the logged in user name/id and message creator id to the display (but HIDE both columns with CSS) and then the comparitors you want will be available to you and you should be able to use the filter to do what you want.

1 Like

Maybe this topic will give you some ideas:

@r4c3rx -

This is more complex than one thinks. I had a similar need and @kruizf201 had to kick his awesome coding skills into high gear to make something work for me. I would recommend reaching out to @kruizf201 and seeing if you can come up with an economical solution.

Adam

1 Like

You can add a custom class to that edit button and use the javascript code below:

if("{loggedInUser.Role}" == "Admin")
{
    $('editButton').css('display', 'none');
}

Let me know if that works for you, you can freely edit the code based from the conditions that you have.

1 Like