Provide visual feedback when users cannot edit a page.

This commit is contained in:
Andrew McMillan 2010-04-12 21:59:40 +12:00
parent c144f31562
commit 1dab49a419
2 changed files with 4 additions and 1 deletions

View File

@ -117,6 +117,9 @@ if ( $can_write_collection && $editor->IsSubmit() ) {
}
else {
$editor->GetRecord();
if ( $editor->IsSubmit() ) {
$c->messages[] = i18n('You do not have permission to modify this record.');
}
}
if ( $editor->Available() ) {
$c->page_title = $editor->Title(translate('Collection').': '.$editor->Value('dav_displayname'));

View File

@ -158,7 +158,7 @@ if ( $can_write_principal && $editor->IsSubmit() ) {
else {
$editor->GetRecord();
if ( $editor->IsSubmit() ) {
$post_values = true;
$c->messages[] = i18n('You do not have permission to modify this record.');
}
}
if ( $editor->Available() ) {