9using System.Collections.Generic;
12using System.Threading.Tasks;
23 #region Object Level Roles
30 public static void AllowGet(Type objectType, params
string[] roles)
41 public static void DenyGet(Type objectType, params
string[] roles)
52 public static void AllowEdit(Type objectType, params
string[] roles)
63 public static void DenyEdit(Type objectType, params
string[] roles)
74 public static void AllowCreate(Type objectType, params
string[] roles)
85 public static void DenyCreate(Type objectType, params
string[] roles)
96 public static void AllowDelete(Type objectType, params
string[] roles)
107 public static void DenyDelete(Type objectType, params
string[] roles)
114 #region Check Object Level Roles
Tracks the business rules for a business object.
static bool HasPermission(AuthorizationActions action, Type objectType)
Checks per-type authorization rules.
void AddRule(IBusinessRuleBase rule)
Associates a business rule with the business object.
IsInRole authorization rule.
IsNotInRole authorization rule.
static void AllowDelete(Type objectType, params string[] roles)
Specify the roles allowed to delete a given type of business object.
static bool CanDeleteObject(Type objectType)
Gets a value indicating whether the current user is allowed to delete an instance of the business obj...
static void AllowEdit(Type objectType, params string[] roles)
Specify the roles allowed to edit (save) a given type of business object.
static bool CanGetObject(Type objectType)
Gets a value indicating whether the current user is allowed to get (fetch) an instance of the busines...
static void DenyDelete(Type objectType, params string[] roles)
Specify the roles not allowed to delete a given type of business object.
static void DenyEdit(Type objectType, params string[] roles)
Specify the roles not allowed to edit (save) a given type of business object.
static void AllowCreate(Type objectType, params string[] roles)
Specify the roles allowed to create a given type of business object.
static void DenyGet(Type objectType, params string[] roles)
Specify the roles not allowed to get (fetch) a given type of business object.
static void AllowGet(Type objectType, params string[] roles)
Specify the roles allowed to get (fetch) a given type of business object.
static bool CanCreateObject(Type objectType)
Gets a value indicating whether the current user is allowed to create an instance of the business obj...
static void DenyCreate(Type objectType, params string[] roles)
Specify the roles not allowed to create a given type of business object.
static bool CanEditObject(Type objectType)
Gets a value indicating whether the current user is allowed to edit (save) an instance of the busines...
AuthorizationActions
Authorization actions.