This project is read-only.

Comments (please forgive me)

Topics: Business Logic Layer
Jan 9, 2008 at 6:20 PM
I know I am going to get flamed but here it goes.

I did try searching the posts but I could not find anything. Is there a setting that restricts comments to only regular users on the site.

If I set a user with no admin and no editor privilege then all they can do is make comments, but it does not seem to make them different from non-users who can make comments but not be logged in.

Someone asked me today if I can set it up to only to only allow users to comment ... I said yes but then could not find the setting.

Of course this may never have been intended since it is a blog and comments for the most part are meant to be anonymous at times.
Jan 25, 2008 at 2:46 AM
I am also wondering how to get the blog to only allow logged in users to post comments. Am I missing this functionality or do I have to make a change to the code?
Jan 27, 2008 at 2:51 AM
Edited Jan 27, 2008 at 2:52 AM
OK, I did a quick work around to allow only authenticated user to post comments.
Line 131 of the CommentView.ascx.cs I added the AND clause for authenticated users
if (BlogSettings.Instance.IsCommentsEnabled && Page.User.Identity.IsAuthenticated)

I haven't tested it extensively but it looks like it does the trick without breaking anything else.