1
Vote

Allow attributes read-only property to be configured by operation

description

There is a rare set of attributes which have the "No user modification" property.
These can only be initialized, but may not be changed afterward. Meaning, their value needs to be provided when adding the entry, but may not be present when updating the entry.

For these attributes the proper annotations by operation would be:
  • Update
[DirectoryAttribute("objectsid", StoreGenerated = false, ReadOnly = true)]
  • Add
[DirectoryAttribute("objectsid", StoreGenerated = false, ReadOnly = false)]
This could be modeled by changing the ReadOnly property of the annotation from bool to an enum such as the following:
    [Flags]
    public enum ReadOnlyOperations
    {
        None = 0x0,
        Add  = 0x1,
        Set  = 0x2,
        All  = Add | Set
    }

comments