Jump to content


Question about block field after save and log user changes

log changes block field user cant edit after save

  • Please log in to reply
1 reply to this topic

#1 Adrian

Adrian

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 12 January 2019 - 03: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 

 



#2 NadimD

NadimD

    Member

  • Members
  • PipPip
  • 13 posts

Posted 12 January 2019 - 09: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.groceryc...tions_functions

Callbacks for the Entreprise edition : https://www.groceryc...d-function-list






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users