M-Files API 23.11.13135.0
AutomaticPermissions Object
Members 
Description
Specifies the automatic ACL for a value list item.
Public Methods
Creates a copy of the object.
Specifies that the automatic ACL is based on the object's own ACL.
Specifies a new named ACL as the automatic ACL.
Public Properties
Specifies whether a user can deactivate this automatic component.
Specifies whether the ACL defined by this automatic ACL is based on the ACL of the object for which it is defined.
Specifies whether the ACL is the default one, i.e., one that has been inherited from the object type level.
The named ACL specified by this automatic ACL.
Remarks

Specifies automatic permission settings. The settings may be inherited from the object type of an item or they may be specified on the item itself. Despite the source of the settings, there are two ways to specify these: Using the object's own ACL or using a NamedACL. Use the SetNamedACL or SetBasedOnObjectACL to switch between these two modes.

Configuring automatic permissions as seen in the user interface of M-Files Admin.

Example
Defining automatic permissions (Visual Basic) Copy Code
Sub SetAutomaticPermissions( _
        ByVal vault As MFilesAPI.Vault, _
        ByVal valueList As Integer, _
        ByVal itemID As Integer, _
        ByVal acl As MFilesAPI.AccessControlList)

    ' Create internal NamedACL
    Dim nacl As New MFilesAPI.NamedACL
    nacl.AccessControlList = acl
    nacl.Name = "Custom automatic permissions"

    ' Get the value list item.
    Dim listItem As MFilesAPI.ValueListItem = _
        vault.ValueListItemOperations.GetValueListItemByID(valueList, itemID)

    ' The automatic permission property has the value of Nothing if the item doesn't
    ' have automatic permissions specified.
    listItem.AutomaticPermissionsForObjects = New MFilesAPI.AutomaticPermissions()

    ' Set the NACL
    listItem.AutomaticPermissionsForObjects.SetNamedACL(nacl)

    ' Save changes
    vault.ValueListItemOperations.UpdateValueListItem(listItem)

End Sub
See Also

AutomaticPermissions Members