Don't display a grant edit until a user is created.

Removes an unsightly SQL error from the logs, but it also
isn't reasonable to be granting privileges until the
principal record exists to do the granting!
This commit is contained in:
Andrew McMillan 2010-02-24 12:51:43 +13:00
parent 6c193d396a
commit 2bb1dd5adf

View File

@ -529,7 +529,7 @@ if ( $can_write_principal ) {
if ( isset($_GET['edit_grant']) ) {
$browser->MatchedRow('to_principal', $_GET['edit_grant'], 'edit_grant_row');
}
else {
else if ( isset($id ) ) {
$browser->RowFormat( '<tr class="r%d">', '</tr>', '#even' );
$extra_row = array( 'to_principal' => -1 );
$browser->MatchedRow('to_principal', -1, 'edit_grant_row');