/// <summary> /// Fixed: /// </summary> public static Error.Types OnUpdating(SiteSettings ss) { if (!ss.CanManagePermission()) { return(Error.Types.HasNotPermission); } foreach (var controlId in Forms.Keys()) { switch (controlId) { case "InheritPermission": var type = SiteValidators.InheritPermission(ss); if (type != Error.Types.None) { return(type); } break; } } return(Error.Types.None); }
/// <summary> /// Fixed: /// </summary> public static ErrorData OnUpdating(Context context, SiteSettings ss) { if (!context.CanManagePermission(ss: ss)) { return(new ErrorData(type: Error.Types.HasNotPermission)); } foreach (var key in context.Forms.Keys) { switch (key) { case "InheritPermission": var errorData = SiteValidators.InheritPermission( context: context, ss: ss); if (errorData.Type != Error.Types.None) { return(errorData); } break; } } return(new ErrorData(type: Error.Types.None)); }