6 my ($dbh, $perm, $opts) = @_;
8 my $u = $opts->{'user'};
9 my $remote = $opts->{'remote'};
10 my $it = $opts->{'item'};
12 return () unless $remote;
14 if ($u->{'userid'} == $remote->{'userid'}) {
15 $perm->{'delete'} = 1;
19 my $quser = $dbh->quote($u->{'user'});
21 ## check if you're an admin of that journal
22 my $is_manager = $remote ?
$remote->can_manage($u) : undef;
25 $perm->{'delete'} = 1;
28 # TAG:FR:ljtodo:get_friends_in_group
29 foreach my $priv (qw(add edit delete)) {
30 my $group = LJ
::get_friend_group
($u, { name
=> "priv-todo-$priv" });
32 my $mask = 1 << $group->{groupnum
};
33 my $friends = LJ
::get_friends
($u, $mask);
34 $perm->{$priv} = 1 if $friends->{$remote->{userid
}};