[dw-free] Don't display Manage Tags links to users who can't access the Manage Tags page
[commit: http://hg.dwscoalition.org/dw-free/rev/7613d9e765db]
http://bugs.dwscoalition.org/show_bug.cgi?id=3733
Match the logic in /manage/tags.
Patch by
kareila.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=3733
Match the logic in /manage/tags.
Patch by
Files modified:
- cgi-bin/LJ/S2.pm
--------------------------------------------------------------------------------
diff -r fb5f6c21cfba -r 7613d9e765db cgi-bin/LJ/S2.pm
--- a/cgi-bin/LJ/S2.pm Tue Aug 02 18:29:21 2011 +0800
+++ b/cgi-bin/LJ/S2.pm Tue Aug 02 18:37:34 2011 +0800
@@ -2745,18 +2745,16 @@
return $remote->can_moderate( $ju );
}
-sub viewer_can_manage_tags
-{
- my $remote = LJ::get_remote();
- return 0 unless $remote;
+sub viewer_can_manage_tags {
return 0 unless defined $LJ::S2::CURR_PAGE;
my $ju = $LJ::S2::CURR_PAGE->{_u};
- return $remote->can_control_tags( $ju );
+
+ # use the same function as that used in /manage/tags
+ return LJ::get_authas_user( $ju->user ) ? 1 : 0;
}
-sub viewer_sees_control_strip
-{
+sub viewer_sees_control_strip {
return 0 unless $LJ::USE_CONTROL_STRIP;
my $r = BML::get_request();
--------------------------------------------------------------------------------
