⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Question about block field after save and log user changes



Adrian

Adrian
  • profile picture
  • Member

Posted 12 January 2019 - 15:37 PM

I have a question:

I already use grocerycrud and everything works fine, but my boss wanted me to make such thing as below:

First question: When user write some text in a text field and save in grocerycrud after save he cant edit this field again (it should be read-only)

The same field can edit other user as admin (higher priviligades)

How can I do this if it is possible?

Second question: when a user write some text in text field and second user want to add some second text in the same text field , second user cant edit text writed by first user (he can only edit his part of text) .

It may be made in many text fields not only in one textfield but I think you know the plan of project i need to make.

In both cases it is possible also to log any changes users made during editing ( as a history view of data changes)?

I even dont know where to start and I hopefully write to you for your good news

Im waiting for your reply.

Regards,

Adrian 

 


NadimD

NadimD
  • profile picture
  • Member

Posted 12 January 2019 - 21:49 PM

Hello Adrian,

 

Have you looked for callbacks into the documentation ?

Might be really helpful since you can fire you own events before/after most actions.

EG : You could add a callback to test in your code if the user should be allowed to edit/update.

 

Callbacks for the Open Source edition : https://www.grocerycrud.com/documentation/options_functions

Callbacks for the Entreprise edition : https://www.grocerycrud.com/enterprise/api-and-function-list