wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r18049: LJSUP-7729. The role of the Maintainer i...

Committer: gprochaev
LJSUP-7729. The role of the Maintainer is not consistent with its rights

U   trunk/htdocs/community/members.bml
Modified: trunk/htdocs/community/members.bml
===================================================================
--- trunk/htdocs/community/members.bml	2011-01-19 04:31:24 UTC (rev 18048)
+++ trunk/htdocs/community/members.bml	2011-01-19 05:49:00 UTC (rev 18049)
@@ -652,14 +652,18 @@
         %disabled = ( disabled => 'disabled' );
     }
     foreach(@users) {
+        my %disabled_maint = ();
+        if ($_->{'admin'} && !$remote->can_super_manage($c)) {
+            %disabled_maint = %disabled ? () : ( disabled => 'disabled' );
+        }
         my $rstyle = ($rc++ & 1) ? "altrow2" : "altrow1";
         $ret .= "<tr class='$rstyle'><td>" . LJ::ljuser($_->{'name'}) . "</td>";
         my $wstr;
         foreach my $key (@attribs) {
             $ret .= "<td style='text-align: center;'>";
             $ret .= LJ::html_check({ 'name' => "edit_$_->{'userid'}_$key",
-                                     'selected' => $_->{$key}, $key =~ /moderate|admin/ ? %disabled : () });
-            $ret .= LJ::html_hidden({ 'name' => "edit_$_->{'userid'}_$key", value => $_->{$key} ? 'on' : '' }) if %disabled;
+                                     'selected' => $_->{$key}, $key =~ /admin/ ? (%disabled, %disabled_maint) : () });
+            $ret .= LJ::html_hidden({ 'name' => "edit_$_->{'userid'}_$key", value => $_->{$key} ? 'on' : '' }) if %disabled || %disabled_maint;
             $wstr .= $attrshort_r{$key} if $_->{$key};
             $ret .= "</td>";
         }

Tags: bml, livejournal, wisest-owl
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