Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
{
  "$type": "iTsense.Moving.Backend.Services.DmcoreService.CoreIdentity.Security.Filter.CoreIdentityAttributeValueFilter`1[[System.UInt32, mscorlib]], iTsense.Moving.Backend.Services.DmcoreService",
  "AttributeValueType": "string",
  "AttributeValueFilterValue": "li",
  "AttributeValueFilterBehaviour": 2,
  "FilterValue": 1,
  "NotContains": false,
  "PropertyChain": {
    "$type": "System.String[], mscorlib",
    "$values": [
      "CoreIdentityAttributeValues"
    ]
  },
  "SubPropertyChain": {
    "$type": "System.String[], mscorlib",
    "$values": [
      "Attribute",
      "Id"
    ]
  }
}

GenericContextPropertyChainFilter

This security filter gives you access to an entity when all property filters match the context this security filter was assigned with.

Code Block
new GenericContextPropertyChainFilter<IEventHandler>(new ContextPropertyFilter<IEventHandler>(new[]
{
    new ContextPropertyFilterDefintion<IEventHandler>(e => e.EventHandlerType.Id, CoreLoginAssignmentContextTypes.OrganizationUnit),
    new ContextPropertyFilterDefintion<IEventHandler>(e => e.Id, CoreLoginAssignmentContextTypes.User)
}));

The first generic is the type you want to give access.

The first parameter is an array of filters of type ContextPropertyFilterDefintion in this filter you define what property of the entity has to match to what context type.

Code Block
{
  "$type": "iTsense.Moving.Backend.DataHandling.Security.Filter.GenericContextPropertyChainFilter`1[[iTsense.Moving.Backend.Common.Dbs.AppCustomer.DataInterfaces.Subscription.IEventHandler, iTsense.Moving.Backend.Common.Dbs.AppCustomer]], iTsense.Moving.Backend.DataHandling",
  "Filter": {
    "$type": "iTsense.Moving.Backend.DataHandling.Security.Filter.FilterBases.ContextPropertyFilter`1[[iTsense.Moving.Backend.Common.Dbs.AppCustomer.DataInterfaces.Subscription.IEventHandler, iTsense.Moving.Backend.Common.Dbs.AppCustomer]], iTsense.Moving.Backend.DataHandling",
    "Filters": {
      "$type": "iTsense.Moving.Backend.DataHandling.Security.Filter.FilterBases.ContextPropertyFilterDefintion`1[[iTsense.Moving.Backend.Common.Dbs.AppCustomer.DataInterfaces.Subscription.IEventHandler, iTsense.Moving.Backend.Common.Dbs.AppCustomer]][], iTsense.Moving.Backend.DataHandling",
      "$values": [
        {
          "$type": "iTsense.Moving.Backend.DataHandling.Security.Filter.FilterBases.ContextPropertyFilterDefintion`1[[iTsense.Moving.Backend.Common.Dbs.AppCustomer.DataInterfaces.Subscription.IEventHandler, iTsense.Moving.Backend.Common.Dbs.AppCustomer]], iTsense.Moving.Backend.DataHandling",
          "PropertyChain": {
            "$type": "System.String[], mscorlib",
            "$values": [
              "EventHandlerType",
              "Id"
            ]
          },
          "ContextType": 1
        },
        {
          "$type": "iTsense.Moving.Backend.DataHandling.Security.Filter.FilterBases.ContextPropertyFilterDefintion`1[[iTsense.Moving.Backend.Common.Dbs.AppCustomer.DataInterfaces.Subscription.IEventHandler, iTsense.Moving.Backend.Common.Dbs.AppCustomer]], iTsense.Moving.Backend.DataHandling",
          "PropertyChain": {
            "$type": "System.String[], mscorlib",
            "$values": [
              "Id"
            ]
          },
          "ContextType": 2
        }
      ]
    }
  }
}

GenericContextCollectionPropertyChainFilter

This security filter works similarly to the GenericContextPropertyChainFilter, with the difference that not the entity itself has to match the property filter, but the filter will be applied with an any to a related collection of entities.

Code Block
new GenericContextCollectionPropertyChainFilter<IEventHandler, IEventSubscription>(e => e.EventSubscriptions, new ContextPropertyFilter<IEventSubscription>(new[]
{
    new ContextPropertyFilterDefintion<IEventSubscription>(e => e.EventHandler.Id, CoreLoginAssignmentContextTypes.OrganizationUnit),
    new ContextPropertyFilterDefintion<IEventSubscription>(e => e.Id, CoreLoginAssignmentContextTypes.User)
}));

The first generic is the type you want to give access.

The second generic is the type of the item in the related collection.

The first parameter is an array of filters of type ContextPropertyFilterDefintion in this filter you define what property of the entity has to match to what context type.

Code Block
{
  "$type": "iTsense.Moving.Backend.DataHandling.Security.Filter.GenericContextCollectionPropertyChainFilter`2[[iTsense.Moving.Backend.Common.Dbs.AppCustomer.DataInterfaces.Subscription.IEventHandler, iTsense.Moving.Backend.Common.Dbs.AppCustomer],[iTsense.Moving.Backend.Common.Dbs.AppCustomer.DataInterfaces.Subscription.IEventSubscription, iTsense.Moving.Backend.Common.Dbs.AppCustomer]], iTsense.Moving.Backend.DataHandling",
  "PropertyChain": {
    "$type": "System.String[], mscorlib",
    "$values": [
      "EventSubscriptions"
    ]
  },
  "Filter": {
    "$type": "iTsense.Moving.Backend.DataHandling.Security.Filter.FilterBases.ContextPropertyFilter`1[[iTsense.Moving.Backend.Common.Dbs.AppCustomer.DataInterfaces.Subscription.IEventSubscription, iTsense.Moving.Backend.Common.Dbs.AppCustomer]], iTsense.Moving.Backend.DataHandling",
    "Filters": {
      "$type": "iTsense.Moving.Backend.DataHandling.Security.Filter.FilterBases.ContextPropertyFilterDefintion`1[[iTsense.Moving.Backend.Common.Dbs.AppCustomer.DataInterfaces.Subscription.IEventSubscription, iTsense.Moving.Backend.Common.Dbs.AppCustomer]][], iTsense.Moving.Backend.DataHandling",
      "$values": [
        {
          "$type": "iTsense.Moving.Backend.DataHandling.Security.Filter.FilterBases.ContextPropertyFilterDefintion`1[[iTsense.Moving.Backend.Common.Dbs.AppCustomer.DataInterfaces.Subscription.IEventSubscription, iTsense.Moving.Backend.Common.Dbs.AppCustomer]], iTsense.Moving.Backend.DataHandling",
          "PropertyChain": {
            "$type": "System.String[], mscorlib",
            "$values": [
              "EventHandler",
              "Id"
            ]
          },
          "ContextType": 1
        },
        {
          "$type": "iTsense.Moving.Backend.DataHandling.Security.Filter.FilterBases.ContextPropertyFilterDefintion`1[[iTsense.Moving.Backend.Common.Dbs.AppCustomer.DataInterfaces.Subscription.IEventSubscription, iTsense.Moving.Backend.Common.Dbs.AppCustomer]], iTsense.Moving.Backend.DataHandling",
          "PropertyChain": {
            "$type": "System.String[], mscorlib",
            "$values": [
              "Id"
            ]
          },
          "ContextType": 2
        }
      ]
    }
  }
}