Changeset 316


Ignore:
Timestamp:
01/16/11 19:09:27 (13 years ago)
Author:
nanardon
Message:
  • add cron job to clean obsoleted data
Location:
server/trunk/web
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • server/trunk/web/lib/Sophie/Controller/Admin.pm

    r296 r316  
    1717 
    1818=cut 
     19 
     20sub begin : Private { 
     21    my ($self, $c) = @_; 
     22 
     23    if (!($c->user_exists && $c->check_user_roles($c->user, 'Admin'))) { 
     24        $c->go('/login/index'); 
     25    } 
     26 
     27    $c->forward('/begin'); 
     28} 
    1929 
    2030=head2 index 
  • server/trunk/web/lib/Sophie/Controller/Admin/Maintenance.pm

    r280 r316  
    1616 
    1717=cut 
     18 
     19sub begin : Private { 
     20    my ($self, $c) = @_; 
     21 
     22    if ($c->req->address eq '127.0.0.1' || $c->req->address eq '::1') { 
     23    } else { 
     24        $c->forward('/admin/begin') 
     25    } 
     26 
     27    $c->forward('/begin'); 
     28} 
     29 
     30sub tasks : XMLRPC { 
     31    my ($self, $c) = @_; 
     32 
     33    $c->stash->{xmlrpc} = [ qw( 
     34        admin.maintenance.delete_expired_sessions 
     35    ) ]; 
     36} 
    1837 
    1938sub delete_expired_sessions :XMLRPC { 
  • server/trunk/web/lib/Sophie/Controller/Root.pm

    r274 r316  
    5050        exists($c->req->params ->{ajax})) { 
    5151        $c->stash->{current_view} = 'Ajax'; 
    52     } 
    53  
    54     if ($c->action =~ m/^admin\//) { 
    55         if (!($c->user_exists && $c->check_user_roles($c->user, 'Admin'))) { 
    56             $c->go('/login/index'); 
    57         } 
    5852    } 
    5953 
Note: See TracChangeset for help on using the changeset viewer.