mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2009-11-03 12:50 am

[dw-free] post from email post-security:access setting

[commit: http://hg.dwscoalition.org/dw-free/rev/9603e41b3cc3]

http://bugs.dwscoalition.org/show_bug.cgi?id=1980

Allow email posting to specify 'access' security.

Patch by [personal profile] kareila.

Files modified:
  • cgi-bin/ljemailgateway.pl
--------------------------------------------------------------------------------
diff -r 0df2b9de2ffc -r 9603e41b3cc3 cgi-bin/ljemailgateway.pl
--- a/cgi-bin/ljemailgateway.pl	Tue Nov 03 00:48:18 2009 +0000
+++ b/cgi-bin/ljemailgateway.pl	Tue Nov 03 00:50:48 2009 +0000
@@ -421,8 +421,8 @@ sub process {
       || $u->{'emailpost_comments'} =~ /noemail/i;
 
     $post_headers{security} = lc($post_headers{security}) || $u->{'emailpost_security'};
-    if ($post_headers{security} =~ /^(public|private|friends)$/) {
-        if ($1 eq 'friends') {
+    if ( $post_headers{security} =~ /^(public|private|friends|access)$/ ) {
+        if ( $1 eq 'friends' or $1 eq 'access' ) {
             $post_headers{security} = 'usemask';
             $amask = 1;
         }
@@ -433,7 +433,7 @@ sub process {
             $amask = (1 << $group->{groupnum});
             $post_headers{security} = 'usemask';
         } else {
-            $err->("Friendgroup \"$post_headers{security}\" not found.  Your journal entry was posted privately.",
+            $err->("Access group \"$post_headers{security}\" not found.  Your journal entry was posted privately.",
                    { nolog => 1 });
             $post_headers{security} = 'private';
         }
--------------------------------------------------------------------------------