added a new permission denied page for the manageVersionTags screen
This commit is contained in:
parent
636d0cb036
commit
dd9cb638f7
3 changed files with 34 additions and 2 deletions
|
|
@ -7,6 +7,7 @@
|
||||||
- fixed: DataForm ignores height on textarea fields
|
- fixed: DataForm ignores height on textarea fields
|
||||||
- fixed: DataForm doesn't keep posted values properly when data fails validation
|
- fixed: DataForm doesn't keep posted values properly when data fails validation
|
||||||
- fixed: Documentation for DataForm and Thingy updated for Possible Values field
|
- fixed: Documentation for DataForm and Thingy updated for Possible Values field
|
||||||
|
- added a new permission denied page for version tag approval
|
||||||
|
|
||||||
7.6.0
|
7.6.0
|
||||||
- added: users may now customize the post received page for the CS
|
- added: users may now customize the post received page for the CS
|
||||||
|
|
|
||||||
|
|
@ -601,14 +601,33 @@ sub www_manageRevisionsInTag {
|
||||||
my $tag = WebGUI::VersionTag->new($session, $tagId);
|
my $tag = WebGUI::VersionTag->new($session, $tagId);
|
||||||
return www_manageVersions( $session ) unless $tag;
|
return www_manageVersions( $session ) unless $tag;
|
||||||
|
|
||||||
|
my $i18n = WebGUI::International->new($session,"VersionTag");
|
||||||
|
|
||||||
### Permissions check
|
### Permissions check
|
||||||
# This screen is also used to approve/deny the tag, so check that first
|
# This screen is also used to approve/deny the tag, so check that first
|
||||||
if ( !canApproveVersionTag( $session, $tag ) && !canViewVersionTag( $session, $tag ) ) {
|
if ( !canApproveVersionTag( $session, $tag ) && !canViewVersionTag( $session, $tag ) ) {
|
||||||
return $session->privilege->insufficient;
|
if ( $session->user->isVisitor ) {
|
||||||
|
return $session->privilege->noAccess;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
# Return a nice error message, since people are getting confused when they try
|
||||||
|
# to approve a tag that's already approved
|
||||||
|
my $html = '<h1>%s</h1>' . "\n"
|
||||||
|
. '<p>%s</p>' . "\n"
|
||||||
|
. q{<p><a href="%s">%s</a></p>} . "\n"
|
||||||
|
;
|
||||||
|
|
||||||
|
return $session->style->userStyle(
|
||||||
|
sprintf $html,
|
||||||
|
$i18n->get( "error permission www_manageRevisionsInTag title" ),
|
||||||
|
$i18n->get( "error permission www_manageRevisionsInTag body" ),
|
||||||
|
$session->url->getSiteURL,
|
||||||
|
$i18n->get( "back to site" ),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
my $ac = WebGUI::AdminConsole->new($session,"versions");
|
my $ac = WebGUI::AdminConsole->new($session,"versions");
|
||||||
my $i18n = WebGUI::International->new($session,"VersionTag");
|
|
||||||
$ac->addSubmenuItem($session->url->page('op=editVersionTag'), $i18n->get("add a version tag"));
|
$ac->addSubmenuItem($session->url->page('op=editVersionTag'), $i18n->get("add a version tag"));
|
||||||
$ac->addSubmenuItem($session->url->page('op=manageCommittedVersions'), $i18n->get("manage committed versions")) if canView($session);
|
$ac->addSubmenuItem($session->url->page('op=manageCommittedVersions'), $i18n->get("manage committed versions")) if canView($session);
|
||||||
$ac->addSubmenuItem($session->url->page('op=manageVersions'), $i18n->get("manage versions"));
|
$ac->addSubmenuItem($session->url->page('op=manageVersions'), $i18n->get("manage versions"));
|
||||||
|
|
|
||||||
|
|
@ -459,6 +459,18 @@ our $I18N = {
|
||||||
lastUpdated => 0,
|
lastUpdated => 0,
|
||||||
context => q{Message for when someone approves a version tag},
|
context => q{Message for when someone approves a version tag},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"error permission www_manageRevisionsInTag title" => {
|
||||||
|
message => q{Permission Denied},
|
||||||
|
lastUpdated => 0,
|
||||||
|
context => q{Title of "permission denied" page for Manage Revisions In Tag},
|
||||||
|
},
|
||||||
|
|
||||||
|
"error permission www_manageRevisionsInTag body" => {
|
||||||
|
message => q{You are not allowed to view this version tag. It is possible that it has already been approved or denied. },
|
||||||
|
lastUpdated => 0,
|
||||||
|
context => q{Explanation of Permission Denied message},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue