Overview
When using IDOL or Smart Search, the search listing is partly based on the permission data in the index. The permission is not checked a second time against the M-Files database as with DtSearch. That said, it is good to know how the permission settings are stored to the index and what restrictions there are when compared to the permission check against M-Files database.
Impacted Products and Versions
M-Files version 22.5.x and later.Solution
Let's start from M-Files side and object's permission settings:In this example we have two ACL components. ACL clas1 [Class] comes from the Class, where you can determine automatic permission settings, when the corresponding Class is used. In this case, it adds "Visible to company management only" NACL (Named Access Control List) to the object. This object is the object itself, where we have selected NACL "Visible to HR department and creator only".
Let's look at NACL "Visible to HR department and creator only" to refresh our memory, how the NACL works.
There are User Groups and one Property. Each has certain permission set with Allow and/or Deny flags. If the user belongs to HR Department group, they can do anything with the object. A thing to remember is that Deny overrides Allow. That's why it is not recommended to use Deny if not absolutely necessary.
Then, let's move to IDOL index and how the permission settings look there. Indexed data is represented in XML format. We are interested of MFACL field that looks like this:
<MFACL>GX:A,M:UX::UG0:-107,-102,31:UG1:-102:UG2:-2:UG3:-2:UG4:-2:NUG::</MFACL>
Let's dissolve the value into smaller parts for more convenient format:
<MFACL>
GX:A,M:
UX::
UG0:-107,-102,31:
UG1:-102:
UG2:-2:
UG3:-2:
UG4:-2:
NUG::
</MFACL>
Then to the explanations:
| GX:A,M: | GX means overrider (X) groups (G). A for M-Files Administrator and M for M-Files server. |
| UX:: | UX means overrider (X) users (U) in case of check-out. |
| UG0:-107,-102,31: | UG0 means Users and Groups of ACL component 0, which usually is the objects own ACL (This object in M-Files permission settings). In this case, NACL "Visible to HR department and creator only" includes Group ID 107: HR Department, Group ID 102: Managers and User ID 31: MOTIVESYS\kimmo.pyhalto |
| UG1:-102: | UG1 means Users and Groups of ACL component 1. In this case ACL clas1 [Class]. NACL (from Class): "Visible to company management only" includes Group ID -102: Managers |
| UG2:-2: | UG2 means Users and Groups of ACL component 2. Because this component is not set, in the index it gets Group ID 2: All internal and external users |
| UG3:-2: | UG3 means Users and Groups of ACL component 3. The same rules apply as above. |
| UG4:-2: | UG4 means Users and Groups of ACL component 4. The same rules apply as above. |
| NUG:: | NUG means Users and Groups that are Denied of seeing the object. In M-Files permissions this would be either Read: Deny or All: Deny. |
GX and UX are IDOL specific fields and they are not visible in Smart Search or in M-Files permission settings. On the other hand, they are kind of a basic logic of M-Files i.e. Administrator can always access all files.
In Smart Search index, the data is the same, but the format is a bit different:
{ 1A: [ -107, -102, 31 ], 2A: [ -102 ], 3A: [ -2 ], 4A: [ -2 ], 5A: [ -2 ] }
As we can see, there are five (5) ACL components. This number cannot be increased in the index data. If M-Files has more than five ACL components the ACL data in the index is automatically changed so only Administrator can access the object. This means, that for the non-Administrator users the file is not found in the quick search, although it is accessible via a view or directly via a link.
