Author: jflesch
Date: 2007-10-28 18:49:32 +0000 (Sun, 28 Oct 2007)
New Revision: 15626

Modified:
   trunk/apps/Thaw/src/thaw/plugins/index/Comment.java
Log:
Remove the moderate button in the comment tab if the index is publicly writable 
(to avoid moderation wars)

Modified: trunk/apps/Thaw/src/thaw/plugins/index/Comment.java
===================================================================
--- trunk/apps/Thaw/src/thaw/plugins/index/Comment.java 2007-10-28 18:45:32 UTC 
(rev 15625)
+++ trunk/apps/Thaw/src/thaw/plugins/index/Comment.java 2007-10-28 18:49:32 UTC 
(rev 15626)
@@ -143,6 +143,7 @@

                blackListed = isBlackListed();
                boolean hasPrivateKey = (index.getPrivateKey() != null);
+               boolean isPrivateKeyPublished = index.publishPrivateKey();

                /**
                 * we don't display if it is blacklisted and we don't have the 
private key
@@ -205,7 +206,8 @@

                bottomRightPanel.add(trustPanel, BorderLayout.CENTER);

-               if (hasPrivateKey && (author.getPrivateKey() == null || 
blackListed) ) {
+               if ( (hasPrivateKey && (author.getPrivateKey() == null || 
blackListed) )
+                       && (!isPrivateKeyPublished) ) {
                        changeBlackListState = new JButton(blackListed ?
                                                           
I18n.getMessage("thaw.plugin.index.comment.unmoderate") :
                                                           
I18n.getMessage("thaw.plugin.index.comment.moderate"));


Reply via email to