Condition based edit permission?

Hi,

I have a use case wherein i can have users register and post photos to the app and they are displayed on a wall. While they are filling in the details I am giving an option to keep the photo private so that it doesn’t show up immediately but the user needs to have the option of enabling it for public viewing at a later date.

I want to know how to give this option to the user on a per-image basis where he can go and mark the photo as public. I don’t want them to edit any other fields but just this public/private toggle switch editing “IF” the photo is currently marked as Private.

Below is the basic table that I have & also how I am displaying the photos on the page based on filters.

Thanks

Hi,

  • In your form to post the image, have a toggle component (linked to a column true/false)

  • In your inline list to display the images, have a filter displaying only if the column is true (assuming true = public)

nb: make the detailed screen of the photo “editable” to signed-in user, so that they can change later on (alternatively could be a component in the detail screen with "visibility only for signed in user)

You can have a separate tab labelled say “My Photos” that is visible only to the signed-in user by using visibility condition Email is signed-in user.

In this tab, you can show all the images with a tag as Private or Public, and then have a selection switch that is for the Public Private toggle switch. That will allow the user to make public images private or private images public.

If you want only the private images to be shown on this tab, then have filter Public/Private is Private and also Email is Signed-in User, so it shows only Private images of the user.

1 Like

Hey AyS - the first part of the message what you have written is already implemented. By default the images are public and if the user wants it to be private then they have ti click on the switch and am capturing and displaying the details page based on that filter ( my second image above ).

Below is my form page.

My challenge is with the second step which is enabling the original owner of the pic on his profile page, to enable the pic to make it public. I want just this option to get enabled if he is logged in and if he is on this page and no other option to edit on this page (ideally).

In the Profile page, have the inline list with the filter Email is Signed-In User and Image is Private. Then below, each image, select a Switch component and point it to the Public/Private column. Then, user can select the Switch component to enable it and make it Public. There is no need for editing privileges to be provided.

1 Like

Vijay thanks a lot for the suggestion on having a new tab. I was a bit reluctant on doing it in the Profile tab.

I created a inline list with Check list option and then filtered it by signed-in user and the Private flag and now clicking on the checklist enables me to make it public.

While doing so i realized i can remove the “flag” option and have all images listed in this tab and have the ability to make any image public or private when needed.

Thanks a lot Vijay :slight_smile:

1 Like