Edit form

Hello Jeff
there you are an extract of app.

What I search to do
When the member use “Accès Direct” he don’t have to edit
When the accès is by Administrateur, this admin can edit

Problem Glide
When the profile of member is displayed by administrateurs
image
is the same that when is displayed by Accès direct of theMember
image

The rules are the same, so how to do the difference ?

Is there any chance that you can turn on copying so I can copy the app and see the internals?

Just looking at it quickly, it looks like you don’t have any conditions set for the edit option, so anybody can edit. Also, I see that your two administrators already have a code entered, so that tells me that it might not be a user specific column that you are using to store the entered code.

I am sorry, I forgot, now you can copy app

Try to code in Edit rules this
image
And then the Admin list a member, he can edit him

cannot

Sorry for the delay. I finally got a chance to take a quick look at this. I made some minor changes.

  • First, I added a new column to hold the entered code. I made it user specific. Since it’s user specific, it only lives in glide. It will hold a different value for each user’s device, and since you are not signing into the app, it will clear itself every time the app is completely closed. The new column is named us-Code saisi. I didn’t delete your old Code saisi column, but I did rename it as Delete This - Code saisi since it should be deleted.
  • Second, I needed to add some additional columns to get the edit condition to work.
    • First I created an if-CodeMatch IF column. This checks if the code that the user entered matches the code that is on their user record.
    • Next I created a tmp-User-Club-Admin-CodeMatch Template column. This joins the club name column, the responsable column, and the IF column, that I created above, all together.
    • Next I created a tmp-Club-Admin-CodeMatch column. This joins the club name column, the word ‘Responsable’, and the word ‘true’.
    • Next I created a rel-AdminWithCorrectCode Relation column. This takes the tmp-Club-Admin-CodeMatch with the hardcoded ‘Responsable’ and ‘true’ words and links it to the tmp-User-Club-Admin-CodeMatch that contains each user’s results from the Responsable and if-Codematch column values. This is a single relation, so it will find the first Admin row in that same club that has entered the correct code.
    • Finally, I added an if-UserIsAdmin IF column that just checks if the relation is empty and returns true or false. This is what I finally used for the edit condition.

I probably would have set things up a little differently if I were doing the whole thing myself, but I wanted to keep as much the same as you have it now. Take a look and see if it works how you expect it to. Once an admin enters the correct code, then only they should be able to edit the other members in their club. Another member would have to know the admin code to be able to edit other members. This should work properly if you have multiple Admins in the same club as well. Also, whenever you refresh your browser, it will clear out that user specific code column.

I should also mention that since your app is public and you don’t use row owners to secure any data, it is possible for someone with technical knowledge to be able to look at all of the underlying data and find out anybody’s code (including the admins) and then be able to edit other users. If none of the information needs to be private and you trust your users then you should be fine with this current setup. I just wanted to make sure that you were aware.

Let me know what you think or if I missed anything.

2 Likes

Hello Jeff : Great job.
Thank you so much. My goal is to make the application very easy to use. Users do not want to enter codes or connect to e-mail to get a pin, etc. In practice, this application replaces a paper sticker with a digital sticker and nothing else. The administrator must be able to change the validity date of his members, and there is nothing confidential. But like you said, there can be some people having fun destroying other people’s apps. Can row owner can better protect? I have to explore this.
Thanks again Jeff, I have a lot of progress to make in my knowledge of Glide.

1 Like

Hello,
We can are a code on submit action, but I dont find if there are an action code on return.
Any Idea ?
Thanks

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

I don’t think I understand the question. Can you rephrase it?