--- trunk/lib/Transports/Model/Destination.pm 2006/05/26 18:28:51 21 +++ trunk/lib/Transports/Model/Destination.pm 2006/05/26 18:35:08 22 @@ -23,5 +23,23 @@ return $self->column("name")->valid_values; } +=head2 current_user_can ACTION + +Let everybody create, read and update, but not delete. + +=cut + +sub current_user_can { + my $self = shift; + my $type = shift; + + # We probably want something like this eventually: + if ($type =~ /(?:create|read|update)/i) { + return 1; + } else { + return $self->SUPER::current_user_can($type, @_); + } +} + 1;