/[Arh]/lib/Arh/Model/Picture.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/Arh/Model/Picture.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 12 by dpavlin, Thu Nov 29 19:32:41 2007 UTC revision 13 by dpavlin, Fri Nov 30 00:03:15 2007 UTC
# Line 39  sub all_filenames { Line 39  sub all_filenames {
39          my @files;          my @files;
40          my $path = Jifty::Util->app_root . '/share/web/static/pics';          my $path = Jifty::Util->app_root . '/share/web/static/pics';
41    
42          warn "## path = $path";  #       warn "## path = $path";
43    
44          find({ wanted => sub {          find({ wanted => sub {
45                  my $f = $File::Find::name;                  my $f = $File::Find::name;
# Line 47  sub all_filenames { Line 47  sub all_filenames {
47                  push @files, $_;                  push @files, $_;
48          }, follow => 0 }, $path);          }, follow => 0 }, $path);
49    
50          warn "## all_filenames = ",dump( @files );  #       warn "## all_filenames = ",dump( @files );
51    
52          return @files;          return @files;
53  }  }
54    
55  #use Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata; # created_by, created_on, updated_on  #use Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata; # created_by, created_on, updated_on
56    
57  sub current_user_can {  use Arh::DefaultACL;
         my ( $self, $action,$item,$name ) = @_;  
         return 1 if $self->current_user->superuser || $self->current_user->administrator;  
         return 1 if $action eq 'read';  
     return 0;  
 }  
58    
59  1;  1;
60    

Legend:
Removed from v.12  
changed lines
  Added in v.13

  ViewVC Help
Powered by ViewVC 1.1.26