Skip to content

Commit

Permalink
These secondary canView checks are not needed, since the whole thing …
Browse files Browse the repository at this point in the history
…is guarded by the canView at the top of www_manageRevisions.
  • Loading branch information
perlDreamer committed Jul 11, 2012
1 parent a3f5b3a commit f25e394
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/WebGUI/Operation/VersionTag.pm
Expand Up @@ -613,8 +613,8 @@ sub www_manageVersions {
my $i18n = WebGUI::International->new($session,"VersionTag");
my ($icon, $url, $datetime, $user) = $session->quick(qw(icon url datetime user));
$ac->addSubmenuItem($url->page('op=editVersionTag'), $i18n->get("add a version tag"));
$ac->addSubmenuItem($url->page('op=managePendingVersions'), $i18n->get("manage pending versions")) if canView($session);
$ac->addSubmenuItem($url->page('op=manageCommittedVersions'), $i18n->get("manage committed versions")) if canView($session);
$ac->addSubmenuItem($url->page('op=managePendingVersions'), $i18n->get("manage pending versions"));
$ac->addSubmenuItem($url->page('op=manageCommittedVersions'), $i18n->get("manage committed versions"));
my ($tag,$workingTagId) = $session->db->quickArray("select name,tagId from assetVersionTag where tagId=?",[$session->scratch->get("versionTag")]);
$tag ||= "None";
my $rollback = $i18n->get("rollback");
Expand All @@ -630,9 +630,7 @@ sub www_manageVersions {
my $u = WebGUI::User->new($session,$tag->get("createdBy"));
$output .= '<tr>
<td>';
if (canView($session)) {
$output .= $icon->delete("op=rollbackVersionTag;tagId=".$tag->getId,undef,$rollbackPrompt);
}
$output .= $icon->delete("op=rollbackVersionTag;tagId=".$tag->getId,undef,$rollbackPrompt);
$output .= $icon->edit("op=editVersionTag;tagId=".$tag->getId)
.'</td>
<td><a href="'.$url->page("op=manageRevisionsInTag;tagId=".$tag->getId).'">'.$tag->get("name").'</a></td>
Expand Down

0 comments on commit f25e394

Please sign in to comment.