comparison Lib/IMPL/Web/Application/Action.pm @ 340:c090d9102a38

web application security refactoring
author cin
date Fri, 21 Jun 2013 02:43:56 +0400
parents 97628101b765
children ec58c47edb52
comparison
equal deleted inserted replaced
339:97628101b765 340:c090d9102a38
17 'IMPL::Object::Autofill' => '@_', 17 'IMPL::Object::Autofill' => '@_',
18 'IMPL::Object::Disposable' => undef 18 'IMPL::Object::Disposable' => undef
19 ], 19 ],
20 props => [ 20 props => [
21 application => PROP_RW, 21 application => PROP_RW,
22 security => PROP_RW,
22 query => PROP_RO, 23 query => PROP_RO,
23 context => PROP_RW, 24 context => PROP_RW,
24 _jsonData => PROP_RW, 25 _jsonData => PROP_RW,
25 ] 26 ]
26 }; 27 };
27 28
28 sub CTOR { 29 sub CTOR {
29 my ($this) = @_; 30 my ($this) = @_;
30 31
31 $this->context({}); 32 $this->context({});
33 $this->security($this->application->security->new())
34 if $this->application->security;
32 } 35 }
33 36
34 sub cookie { 37 sub cookie {
35 my ($this,$name,$rx) = @_; 38 my ($this,$name,$rx) = @_;
36 39
171 } 174 }
172 175
173 sub Dispose { 176 sub Dispose {
174 my ($this) = @_; 177 my ($this) = @_;
175 178
179 $this->security->Dispose()
180 if $this->security and $this->security->can('Dispose');
181
176 $_->Dispose() foreach grep is($_,Disposable), values %{$this->context}; 182 $_->Dispose() foreach grep is($_,Disposable), values %{$this->context};
177 183
178 $this->next::method(); 184 $this->next::method();
179 } 185 }
180 186