Search code examples
c#.netaccess-control

System.Security.AccessControl AccessControlType vs AceType


Is System.Security.AccessControl.AceType is just more detailed version of System.Security.AccessControl.AccessControlType? Is there a way to convert AceType to AccessControlType or these are two different things?


Solution

  • Although both the enums looks similar there is bit difference in the way they are defined. As per Microsoft docs.

    Purpose :

    "AccessControlType" : Specifies whether ACE allows or denies the access.

    "AceType" : Specifies the type of ACE access. That has many values defined here. We can also take this as the detailed version of AccessControlType.

    Convertions : Direct conversion isn't possible as they represent different things, but you can consider writing new converter using the Allowed / Denied Keywords