Kevin M. Brooks (lucretio) wrote in lj_dev,
Kevin M. Brooks
lucretio
lj_dev

Bug? I can post to deleted community.

I can post to a deleted community (namely developers). Is this a bug or a feature?

If it's a bug, I think in LJ::Protocol::postevent (around line 414) it should check if the community is deleted or suspended.

Something like this:

    ### allow for posting to journals that aren't yours (if you have permission)
    my $posterid = $u->{'userid'};
    my $ownerid = $flags->{'ownerid'};
+
+   ### disallow posting in deleted or suspended communities
+   return fail($err,XXX) if ($ownerid->{'statusvis'} eq "S" ||
+                             $ownerid->{'statusvis'} eq "D");
 
    # make the proper date format

Oops: $ownerid wouldn't work how I had it, but I'm sure you understand what I mean.
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments