This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues/pull-requests.
2016-01-13 04:11:46 +01:00
|
|
|
package rt::adminfake;
|
|
|
|
|
|
|
|
use configuration ':all';
|
|
|
|
use app;
|
|
|
|
use utf8;
|
2016-02-10 11:07:34 +01:00
|
|
|
use open qw/:std :utf8/;
|
2016-01-13 04:11:46 +01:00
|
|
|
|
|
|
|
use Data::Dump qw( dump );
|
|
|
|
|
|
|
|
use Exporter 'import';
|
|
|
|
# what we want to export eventually
|
|
|
|
our @EXPORT_OK = qw/rt_admin_fake/;
|
|
|
|
|
|
|
|
# bundle of exports (tags)
|
|
|
|
our %EXPORT_TAGS = ( all => [qw/rt_admin_fake/] );
|
|
|
|
|
|
|
|
sub rt_admin_fake {
|
|
|
|
my ($session, $param, $request) = @_;
|
|
|
|
my $res;
|
|
|
|
my $alldomains = [ { qw/domain toto.netlib.re login toto/ } ];
|
|
|
|
my $allusers = [ { qw/ login toto admin 0 / }
|
|
|
|
, { qw/login bidule admin 1/ }
|
|
|
|
, { qw/login machin admin 0 / } ];
|
|
|
|
my $domains = [ { qw/toto.netlib.re/ } ];
|
|
|
|
$$res{template} = 'administration';
|
|
|
|
$$res{params} = {
|
|
|
|
login => "toto"
|
|
|
|
, admin => 1
|
|
|
|
, domains => $domains
|
|
|
|
, alldomains => $alldomains
|
|
|
|
, allusers => $allusers
|
|
|
|
};
|
|
|
|
$res
|
|
|
|
}
|
|
|
|
|
|
|
|
1;
|