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-04-29 06:09 am

[dw-free] crossposter doesn't use LJ-side custom access groups

[commit: http://hg.dwscoalition.org/dw-free/rev/30376569bcb4]

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

Xposter: custom friend groups -> private, until we can get proper mapping
support.

Patch by [personal profile] allen.

Files modified:
  • cgi-bin/DW/External/XPostProtocol/LJXMLRPC.pm
--------------------------------------------------------------------------------
diff -r 6cafedd9e2be -r 30376569bcb4 cgi-bin/DW/External/XPostProtocol/LJXMLRPC.pm
--- a/cgi-bin/DW/External/XPostProtocol/LJXMLRPC.pm	Wed Apr 29 06:08:10 2009 +0000
+++ b/cgi-bin/DW/External/XPostProtocol/LJXMLRPC.pm	Wed Apr 29 06:09:38 2009 +0000
@@ -180,10 +180,16 @@ sub entry_to_req {
         'security' => $entry->security,
     };
 
-    # if set to usemask, we really can only go general friends-lock,
-    # since it's not like our friends groups will match
-    $req->{allowmask} = "1" if $req->{security} eq 'usemask';
-
+    # usemask is either full access list, or custom groups.
+    if ($req->{security} eq 'usemask') {
+        # if allowmask is 1, then it means full access list
+        if ($entry->allowmask == 1) {
+            $req->{allowmask} = "1";
+        } else {
+            # otherwise, it's a custom group.  just make it private for now.
+            $req->{security} = "private";
+        }
+    }
     # set the date.
     my $eventtime = $entry->eventtime_mysql;
     $eventtime =~ /^(\d\d\d\d)-(\d\d)-(\d\d) (\d\d):(\d\d)/;
--------------------------------------------------------------------------------