ServiceStackSecuritySettings

Namespace: ASPSecurityKit.ServiceStack
Assembly: ASPSecurityKit.ServiceStack.dll

Summary

Implements the IServiceStackSecuritySettings.

Constructors

#ctor(config)

Summary

Initializes a new instance of the ServiceStackSecuritySettings class.

Parameters
Name Type Description
config ASPSecurityKit.IConfig The config.

Properties

DTONameAsPermission

Summary

Gets or sets a value indicating whether to consider dto name as the permission code. The default is true.

Value

true if dto name should be considered as the permission code; otherwise, false.

Remarks

This property is helpful for services with SOAP support because in Service Stack each http method has its own dto. However, this is a general setting and if AuthAction/AuthEntity attributes are defined for a specific http method, they’ll override this behavior.

DTOSuffix

Summary

Gets or sets the suffix to be ignored while computing permission code from request DTOs.

Value

The suffix to be ignored while computing permission code from request DTOs.

EntityNameFromDTONameGetter

Summary

Gets or sets a delegate that extracts the entity name from the specified Request DTO name to be used for prefixing identifier properties (with incomplete names like ‘Id’) to locate right related references loader.

Remarks

The default implementation has the following match pattern: “^(get|retrieve|fetch|put|update|patch|post|create|delete|remove|edit|modify|search|lookup)?([A-Z].*?)(ies|s)?$”. Thus, not only it removes the initial verbs, but also converts plural name into singular one. You can either override it completely or extend it by first copying the default implementation in a local variable, setting this property with a delegate that first calls that local copy and further processes the returned name or something like that.