How to lock Records AND all Subpanels (especially creating Relationships) for Records with a special Status?

Hello Developers,

We would like to implement the following:
Suppose we have a data set that has a custom field called 'Status'. If the status “B” is selected in this field, then the data record should no longer be able to be changed. This can apparently be implemented quite well with the adjustments mentioned here: enricosimonetti.com/.../

But: How can I prevent relationships from being created or changed for this data record? The aim is to prevent entries from being created or changed in the subpanels of the data set and also to prevent the possibility of linking to the data set from other data sets (is it sufficient to adjust the filters here?).

What are your experiences in this regard?
I look forward to your feedback.

Kind regards.

Martin

Parents
  • The first thing that comes to mind to prevent linking or the removal of links is to have some logic hooks:  before_relationship_add, before_relationship_delete on the module with the 'Status' that checks if the status is 'B' and aborts the save.
    You'll need to find a way to get the logic hook to trigger an exception/notification to the user, but it may be one way to stop relationships being added.

     's solution using ACLs should prevent edits across all editing methods: inline edit, list view edit, subpanel edits so that should cover any edits of the record itself.

    FrancescaS

Reply
  • The first thing that comes to mind to prevent linking or the removal of links is to have some logic hooks:  before_relationship_add, before_relationship_delete on the module with the 'Status' that checks if the status is 'B' and aborts the save.
    You'll need to find a way to get the logic hook to trigger an exception/notification to the user, but it may be one way to stop relationships being added.

     's solution using ACLs should prevent edits across all editing methods: inline edit, list view edit, subpanel edits so that should cover any edits of the record itself.

    FrancescaS

Children
No Data