Coming soon: Your brand new Help Center & Community! Get a sneak-peek here

Sentry Module


can it be that there are problems with Sentry plugins in the Windows client under SuperOffice 8.0?
We have an existing Sentry plugin, which our customer has been using since SuperOffice 7.1.
updated to SuperOffice 8.0. One of the rules the module should enforce is that
certain users are not allowed to create new companies.

In SuperOffice 7.1 we used the following code for this purpose:

public void GetTableRights (int AssocId, int GroupId, int RecordId, string TableName, ref object[] RecordData, ref bool o_CanInsertRow, ref bool o_CanReadRow, ref bool o_CanUpdateRow, ref bool o_CanDeleteRow, ref string o_ToolTip)
   if (TableName. ToLower () == "contact")
     o_CanInsertRow = false; 
     o_ToolTip = "yor are not allowed to add new companies.";

In SuperOffice 8.0, however, the GetTableRights method is no longer called when accessing the company card. Instead, we implemented a NetServer ContactSentry as follows:


public void ModifyTableRights (TableRights)
   var rightsIterator = rights.Keys.ToList ();
   foreach (TableInfo tInfo in rightsIterator)
     var newRight = new TableRight (ETableRight.UDR);
     if (tInfo.DbName == "contact")
       rights[tInfo] = newRight;


In the SuperOffice 8.0 web client this works fine. The New button is grayed out as desired in the company context.
In the Windows client, however, the Sentry has no effect at all. The ModifyTableRights Code
is executed and the TableRight is also set. However, it has no impact on the client.

This function is crucial for our customer to perform the update to SuperOffice 8.0.

Furthermore, other restrictions - for example read-only- also have no
impact on the Windows client. The companies can still be deleted and edited.
Here too, it works perfectly in the web client.

Do we miss anything? Also, is there a current overview of which parts of the Windows client still use the old COM Sentry and which ones are using the NetServer Sentry?

With kind regards
Andreas Bender

RE: Sentry Module

My gutt feeling is that your COM Sentry Plugin is not properly registered.

- ModifyTableRights is Web only.
- Win still uses the COM API for its sentry plugin but there is no reason why you cannot combine both Win & Web plugin code in the same c# dll.

That said, Win now uses the Netserver Document plugin.
We had plans to do away with the COM Sentry plugin too but never got to it - though it is a much easier and smaller task...

Bottom line, continue to use GetTableRights but verify that your dll is properly registered. If this does not help, let us know and then I suppose we are going to have to dig deeper - somehow.


Af: Conrad Weyns 28. nov 2017

RE: Sentry Module

Hello, Conrad,

Thank you for the quick answer. You're right, the problem was ours.
The Sentry itself was registered correctly, but for some user groups
the contact table was not registered in the GetTableList () method.
This is quite intentional because no filtering of companies is required for this group.
Only the creation of new company records is to be blocked here.
Consequently, there were no calls of GetTableRights ().
The NetServer ContactSentry call was probably caused by the archives. I was mislead by this.

Thanks, though, you got us on the right track.

With kind regards
Andreas Bender

Af: Andreas Bender 29. nov 2017