7.3. Protecting objects

When dealing with critical models it is possible to protect objects from accidental modifications by using the Protect menu item when right clicking them. Once protected, the objects can't be moved (in the case of graphical objects), can't have any attribute modified or deleted. If the user tries one of the mentioned operations pgModeler will raise errors and abort the action. This feature is quite useful when the model is handled by different users and one doesn't want that the other changes the object's attributes accidentally or deliberately. Obviously, the protection state can be changed by anyone who have access to the model.

The first indication that an object is protected is the color of it's name that appears in red. The second, is the locker object that is placed in a visible location on the object (see the right portion of the image below). In this case, the locker object will appear only for graphical objects. The object protection feature works in a cascade way. In other words, protecting an object will cause its children to be protected as well. For instance, protecting a table will cause all columns, constraints, triggers, rules, etc to be protected. The same idea is applied to the database object, applying protection to it will cause all objects on the model to be protected in the same way.


Dec 30, 2020 at 09:53