namespace: Serenity.Services assembly: Serenity.Net.Web
Creates an instance of the ServiceAuthorizeAttribute.
public ServiceAuthorizeAttribute()
namespace: Serenity.Services assembly: Serenity.Net.Web
Creates an instance of the ServiceAuthorizeAttribute with the passed permission.
public ServiceAuthorizeAttribute(object permission)
parameter | description |
---|---|
permission | Permission key |
namespace: Serenity.Services assembly: Serenity.Net.Web
Creates an instance of the ServiceAuthorizeAttribute, while deriving the permission key from the passed type's ReadPermissionAttribute
public ServiceAuthorizeAttribute(Type sourceType)
parameter | description |
---|---|
sourceType |
namespace: Serenity.Services assembly: Serenity.Net.Web
Creates an instance of the ServiceAuthorizeAttribute with a permission key generated by joining the passed permissions with a colon (:), e.g. "module:permission".
public ServiceAuthorizeAttribute(object module, object permission)
parameter | description |
---|---|
module | Module |
permission | Permission key |
namespace: Serenity.Services assembly: Serenity.Net.Web
Creates an instance of the service authorize attribute while trying to determine the permission key from one of the permission attribute types the sourceType has.
protected ServiceAuthorizeAttribute(Type sourceType, params Type[] attributeTypes)
parameter | description |
---|---|
sourceType | Source type |
attributeTypes | Attribute types to check in order |
exception | condition |
---|---|
ArgumentNullException | Source type or attributeTypes is null |
ArgumentOutOfRangeException | One fo the types is not a subclass of the PermissionAttributeBase. |
namespace: Serenity.Services assembly: Serenity.Net.Web
Creates an instance of the ServiceAuthorizeAttribute with a permission key generated by joining the passed permissions with a colon (:), e.g. "module:submodule:permission".
public ServiceAuthorizeAttribute(object module, object submodule, object permission)
parameter | description |
---|---|
module | Module |
submodule | Submodule |
permission | Permission key |