You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
CSLA 8 get the error message when calling HasPermission. Here's the HasPermissioin method being called in CSLA:
//
// Summary:
// Checks per-type authorization rules.
//
// Parameters:
// applicationContext:
//
// action:
// Authorization action.
//
// objectType:
// Type of business object.
public static bool HasPermission(ApplicationContext applicationContext, AuthorizationActions action, Type objectType)
{
if (applicationContext == null)
{
throw new ArgumentNullException("applicationContext");
}
Here's the calling function from the business object:
public static bool CanGetObject(ApplicationContext appContext)
{
return Csla.Rules.BusinessRules.HasPermission(appContext, Csla.Rules.AuthorizationActions.GetObject, typeof(AddressAddressTypeList));
}
The method signatures match and ApplicationContext is valid. What could be happening to get the exception:
Object of type 'Csla.Rules.AddObjectAuthorizationRulesContext' cannot be converted to type 'Csla.ApplicationContext'.
Call Stack only shows what I've posted. Help! :-)
Beta Was this translation helpful? Give feedback.
All reactions