line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package meon::Web::Controller::Members; |
2
|
2
|
|
|
2
|
|
8329505
|
use Moose; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
use 5.010; |
4
|
|
|
|
|
|
|
use utf8; |
5
|
|
|
|
|
|
|
use namespace::autoclean; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use File::MimeInfo 'mimetype'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
BEGIN {extends 'Catalyst::Controller'; } |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub auto : Private { |
12
|
|
|
|
|
|
|
my ( $self, $c ) = @_; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub base : Chained('/') PathPart('members') CaptureArgs(0) { |
16
|
|
|
|
|
|
|
my ( $self, $c ) = @_; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
$c->detach('/login',[]) |
19
|
|
|
|
|
|
|
unless $c->user_exists; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub default : Chained('base') PathPart('') { |
23
|
|
|
|
|
|
|
my ( $self, $c, @args ) = @_; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# private area, restricted to user him self |
26
|
|
|
|
|
|
|
if (($args[0] eq 'profile') && ($args[2] eq 'private')) { |
27
|
|
|
|
|
|
|
my $username = $args[1] // ''; |
28
|
|
|
|
|
|
|
$c->detach('/status_forbidden', []) |
29
|
|
|
|
|
|
|
unless $username eq $c->user->username; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
$c->forward('/resolve_xml', []); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |