/// <summary>Checks whether the user is authorized to use a editable and has sufficient permissions.</summary> /// <param name="security">The security manager to query permissions on.</param> /// <param name="permittableOrSecurable">The object containing security information.</param> /// <param name="user">The user to check permissions for.</param> /// <returns>True if the user is authorized for the given editable.</returns> public static bool IsAuthorized(this ISecurityManager security, ISecurableBase permittableOrSecurable, IPrincipal user) { return(user != null && IsAuthorized(security, (object)permittableOrSecurable, user) && IsPermitted(security, permittableOrSecurable, user)); }
/// <summary>Checks whether the user is authorized to use a editable and has sufficient permissions.</summary> /// <param name="security">The security manager to query permissions on.</param> /// <param name="permittableOrSecurable">The object containing security information.</param> /// <param name="user">The user to check permissions for.</param> /// <param name="item">The item to check permissions for.</param> /// <returns>True if the user is authorized for the given editable.</returns> public static bool IsAuthorized(this ISecurityManager security, ISecurableBase permittableOrSecurable, IPrincipal user, ContentItem item) { return user != null && IsAuthorized(permittableOrSecurable, user, item) && IsPermitted(security, permittableOrSecurable, user, item); }
/// <summary>Checks whether the user is authorized to use a editable and has sufficient permissions.</summary> /// <param name="security">The security manager to query permissions on.</param> /// <param name="permittableOrSecurable">The object containing security information.</param> /// <param name="user">The user to check permissions for.</param> /// <param name="item">The item to check permissions for.</param> /// <returns>True if the user is authorized for the given editable.</returns> public static bool IsAuthorized(this ISecurityManager security, ISecurableBase permittableOrSecurable, IPrincipal user, ContentItem item) { return(user != null && IsAuthorized(permittableOrSecurable, user, item) && IsPermitted(security, permittableOrSecurable, user, item)); }
/// <summary>Checks whether the user is authorized to use a editable and has sufficient permissions.</summary> /// <param name="security">The security manager to query permissions on.</param> /// <param name="permittableOrSecurable">The object containing security information.</param> /// <param name="user">The user to check permissions for.</param> /// <returns>True if the user is authorized for the given editable.</returns> public static bool IsAuthorized(this ISecurityManager security, ISecurableBase permittableOrSecurable, IPrincipal user) { return user != null && IsAuthorized(security, (object)permittableOrSecurable, user) && IsPermitted(security, permittableOrSecurable, user); }