Mercurial > pub > Impl
diff Lib/IMPL/Web/Application/CustomResourceContract.pm @ 330:fe725fad2d90
Added access checking to web resources
author | sergey |
---|---|
date | Tue, 04 Jun 2013 19:25:54 +0400 |
parents | 4abda21186cd |
children | 2ff1726c066c |
line wrap: on
line diff
--- a/Lib/IMPL/Web/Application/CustomResourceContract.pm Mon Jun 03 18:03:54 2013 +0400 +++ b/Lib/IMPL/Web/Application/CustomResourceContract.pm Tue Jun 04 19:25:54 2013 +0400 @@ -23,10 +23,10 @@ sub CTOR { my ($this) = @_; - $this->verbs->{options} = OperationContract->new( binding => \&_HttpOptionsBinding ); + $this->verbs->{options} ||= OperationContract->new( binding => \&_HttpOptionsBinding ); while(my ($verb,$methodName) = each %RESOURCE_BINDINGS) { - $this->verbs->{lc($verb)} = OperationContract->new ( + $this->verbs->{lc($verb)} ||= OperationContract->new ( binding => sub { my ($resource,$action) = @_;