Starting with GEONIS server version 2023, the Delete button will no longer be displayed by default without using GEONIS server Security. The display can now be controlled directly in the table element of the FRM with the option can_delete_object="true" or "false".
Problem
The Delete button in the attribute masks may sometimes be shown to users who cannot or are not allowed to delete objects.
Solution
The Delete button can be removed by adding the following, second line:
Starting from version 2017 in the file C:\inetpub\wwwroot\GEONISserverUI20xx\AttributeEditor\config\configWO.js
gWebOfficeUtils.initButtons(attributeEditor.options, gUrlUtils);
delete attributeEditor.options.buttonCallbacks.delete;
In version 6.0.x in the file indexWebOffice.aspx
initButtons(options, scriptAPI);
delete options.buttonCallbacks.delete;
To make the change effective, it may be necessary to clear the browser cache.
After an update, this configuration must be adjusted again.
Solution for Individual Masks Only
The above configuration always applies to all masks. To remove the Delete button only for individual masks, proceed as follows:
Copy and rename the file configWO.js. For example, configWOcu.js
The file is located here: C:\inetpub\wwwroot\GEONISserverUI20xx\AttributeEditor\config\configWO.jsIn this file add the following second lines:
gWebOfficeUtils.initButtons(attributeEditor.options, gUrlUtils);
delete attributeEditor.options.buttonCallbacks.delete;
Additionally, line 28 must be adjusted:
indexPath: "/GEONISserverUI/AttributeEditor/indexWebOfficeCu.aspx",
Copy and rename the file indexWebOffice.aspx. For example, indexWebOfficeCu.aspx
The file is located here:
C:\inetpub\wwwroot\GEONISserverUI20xx\AttributeEditorIn this file, reference the new config (line 20)
In the URL for the mask without the Delete button, specify the new indexWebOfficeCu.aspx.
To make the change effective, it may be necessary to clear the browser cache.
After an update, this configuration must be adjusted again.
Comments
0 comments
Article is closed for comments.