Support future publish date
See original GitHub issueCurrently, SimpleContent assumes two states: draft posts and publish now. In the NewPost
method of cloudscribe.SimpleContent.MetaWeblogService
, if publish == true, the pubDate is reset to DateTime.UtcNow. The problem is that we are overriding the publish date with now as opposed to using the value being passed in.
My proposed solution is the following: Update this method to continue setting IsPublished to true, but not listing it if using a role other than an administrator or blog editor. So, RSS and typical lists won’t have it until the time is met. I may need a list of roles that should have this view. If there’s already a role checker built in, please let me know.
Generally speaking, we shouldn’t worry about date checking as a blog editor should be allowed to back date a post.
@joeaudette If you agree, I’ll update accordingly.
Issue Analytics
- State:
- Created 5 years ago
- Comments:14
Top GitHub Comments
@jasongaylord I see the problem and fixing it now, will publish updated nugets shortly.
Recently we introduced content history and we changed the implementation of draft vs publish and at that time we did not correctly update the metaweblog service to account for the changes.
I also found another bug when using NoDb, from the web we are using the slug as the id because that makes nicer file names on disk. But with posts created in OLW, it sets the post id to a guid, and it expects to be able to retrieve it using that guid. So I had to fix the NoDb storage code to leave the id alone if it is already populated instead of assuming we need to populate it when creating new posts.
@jasongaylord nice to see your blog running on cloudscribe, good job with the design too!