Remove some debuging lines

This commit is contained in:
Daniel Berteaud 2015-07-13 23:59:23 +02:00
parent f3fb9285f5
commit 0dc7ceea3f
1 changed files with 0 additions and 9 deletions

View File

@ -1043,21 +1043,17 @@ helper key_can_do_this => sub {
}
my $role = $self->get_key_role($data->{token}, $data->{param}->{room});
if (!$role){
$self->app->log->debug("Key " . $data->{token} . " has no role in room " . $data->{param}->{room});
return 0;
}
# API key is an admin one ?
if ($role eq 'admin'){
$self->app->log->debug("Admin API Key, every actions are allowed");
return 1;
}
# Global actions can only be performed by admin keys
if (!$data->{param}->{room}){
$self->app->log->debug("Invalid room ID");
return 0;
}
$self->app->log->debug("Key role: " . $role . " and action: " . $data->{action});
# If this key has owner privileges on this room, allow both owner and partitipant actions
if ($role eq 'owner' && ($actions->{owner}->{$data->{action}} || $actions->{participant}->{$data->{action}})){
return 1;
@ -1066,11 +1062,6 @@ helper key_can_do_this => sub {
elsif ($role eq 'participant' && $actions->{participant}->{$data->{action}}){
return 1;
}
# Else, deny
$self->log_event({
event => 'action_denied',
msg => "API Key " . $data->{token} . " doesn't have permission to call " . $data->{action} . " on room " . $data->{param}->{room}
});
return 0;
};