public bool EditAllowed(IIdentity user) { AppUser u = user as AppUser; if (u != null) { return(u.CanEdit(this)); } else { return(false); } }