diff --git a/public/vroom.pl b/public/vroom.pl index 0d25439..9886a4b 100755 --- a/public/vroom.pl +++ b/public/vroom.pl @@ -656,7 +656,10 @@ post '/action' => sub { my $message = $self->param('message'); my $status = 'error'; my $msg = $self->l('ERROR_OCCURED'); - if ($rcpt !~ m/\S+@\S+\.\S+$/){ + if (!$self->session($room) || $self->session($room)->{role} ne 'owner'){ + $msg = 'NOT_ALLOWED'; + } + elsif ($rcpt !~ m/\S+@\S+\.\S+$/){ $msg = $self->l('ERROR_MAIL_INVALID'); } elsif ($self->email( diff --git a/templates/default/join.html.ep b/templates/default/join.html.ep index 1c4462f..85776e9 100644 --- a/templates/default/join.html.ep +++ b/templates/default/join.html.ep @@ -12,8 +12,42 @@