protected virtual void OnAuthorizeWebPart(WebPartAuthorizationEventArgs e) { WebPartAuthorizationEventHandler handler = (WebPartAuthorizationEventHandler) base.Events[AuthorizeWebPartEvent]; if (handler != null) { handler(this, e); } }
public virtual bool IsAuthorized(Type type, string path, string authorizationFilter, bool isShared) { if (type == null) { throw new ArgumentNullException("type"); } if (type == typeof(UserControl)) { if (string.IsNullOrEmpty(path)) { throw new ArgumentException(System.Web.SR.GetString("WebPartManager_PathCannotBeEmpty")); } } else if (!string.IsNullOrEmpty(path)) { throw new ArgumentException(System.Web.SR.GetString("WebPartManager_PathMustBeEmpty", new object[] { path })); } WebPartAuthorizationEventArgs e = new WebPartAuthorizationEventArgs(type, path, authorizationFilter, isShared); this.OnAuthorizeWebPart(e); return e.IsAuthorized; }
public virtual bool IsAuthorized(Type type, string path, string authorizationFilter, bool isShared) { if (type == null) { throw new ArgumentNullException("type"); } if (type == typeof(UserControl)) { if (String.IsNullOrEmpty(path)) { throw new ArgumentException(SR.GetString(SR.WebPartManager_PathCannotBeEmpty)); } } else { if (!String.IsNullOrEmpty(path)) { throw new ArgumentException(SR.GetString(SR.WebPartManager_PathMustBeEmpty, path)); } } WebPartAuthorizationEventArgs auth = new WebPartAuthorizationEventArgs(type, path, authorizationFilter, isShared); OnAuthorizeWebPart(auth); return auth.IsAuthorized; }
protected virtual new void OnAuthorizeWebPart(WebPartAuthorizationEventArgs e) { }
protected virtual new void OnAuthorizeWebPart(WebPartAuthorizationEventArgs e) { }