source: trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web.pm @ 1137

Last change on this file since 1137 was 1126, checked in by nanardon, 12 years ago

typo

File size: 7.4 KB
Line 
1package LATMOS::Accounts::Web;
2
3use strict;
4use warnings;
5no utf8;
6
7use Catalyst::Runtime '5.70';
8
9# Set flags and add plugins for the application
10#
11#         -Debug: activates the debug mode for very useful log messages
12#   ConfigLoader: will load the configuration from a YAML file in the
13#                 application's home directory
14# Static::Simple: will serve static files from the application's root
15#                 directory
16
17use Catalyst qw/
18    ConfigLoader
19    Static::Simple
20    Session
21    Session::State::Cookie
22    Session::Store::FastMmap
23    Authentication
24    Prototype
25    XMLRPC
26    /;
27
28our $VERSION = '2.0.1';
29
30# Configure the application.
31
32__PACKAGE__->config(
33    objects => {
34        user => {
35            quick_search => [ qw(cn sn givenName) ],
36            list => [ qw(sn givenName mail) ],
37        },
38        group => {
39            quick_search => [ qw(cn description) ],
40            list => [ qw(description) ],
41        },
42        nethost => {
43            quick_search => [ qw(cn description ip cname otherName) ],
44            list => [ qw(description owner) ],
45        },
46        netzone => {
47            quick_search => [ qw(cn description ip) ],
48            list => [ qw(type description) ],
49        },
50        site => {
51            quick_search => [ qw(cn l) ],
52            list => [ qw(l) ],
53        },
54        aliases => {
55            quick_search => [ qw(name) ],
56            list => [ qw() ],
57        },
58
59    },
60    'attrs' => {
61        'physicalDeliveryOfficeName' => {
62            'label' => 'Bureau'
63        },
64        'sutype' => {
65            'label' => 'Structure admin.'
66        },
67        'department' => {
68            'label' => "Departement"
69        },
70        'macaddr' => {
71            'label' => 'Adresse Ethernet'
72        },
73        'date' => {
74            'label' => "Modifié le"
75        },
76        'cn' => {
77            'label' => 'Nom'
78        },
79        'grade' => {
80            'label' => 'Grade'
81        },
82        'net' => {
83            'label' => "Réseau"
84        },
85        'cname' => {
86            'label' => 'Alias (CName)'
87        },
88        'netExclude' => {
89            'label' => "Réseau exclus"
90        },
91        'contratType' => {
92            'label' => 'Type de contrat'
93        },
94        'co' => {
95            'label' => 'Pays'
96        },
97        'template' => {
98            'label' => "ModÚle"
99        },
100        'uid' => {
101            'label' => 'Login'
102        },
103        'otherTelephone' => {
104            'label' => "Téléphone (autre)"
105        },
106        'name' => {
107            'label' => 'Nom'
108        },
109        'telephoneNumber' => {
110            'label' => "Téléphone"
111        },
112        'noDynamic' => {
113            'label' => 'Pas d\'adressage dyn.'
114        },
115        'st' => {
116            'label' => "État (US)"
117        },
118        'output' => {
119            'label' => 'Sortie'
120        },
121        'description' => {
122            'label' => 'Description'
123        },
124        'facsimileTelephoneNumber' => {
125            'label' => 'Fax'
126        },
127        'isMainAddress' => {
128            'label' => 'Adresse principale'
129        },
130        'streetAddress' => {
131            'label' => 'Rue'
132        },
133        'gidNumber' => {
134            'label' => 'GID'
135        },
136        'sn' => {
137            'label' => 'Nom'
138        },
139        'type' => {
140            'label' => 'Type'
141        },
142        'unexported' => {
143            'label' => "Caché"
144        },
145        'title' => {
146            'label' => 'Fonction'
147        },
148        'givenName' => {
149            'label' => "Prénom"
150        },
151        'loginShell' => {
152            'label' => 'Shell'
153        },
154        'uidNumber' => {
155            'label' => 'UID'
156        },
157        'gecos' => {
158            'label' => 'Gecos Unix'
159        },
160        'mail' => {
161            'label' => 'Mail'
162        },
163        'company' => {
164            'label' => "Société"
165        },
166        'owner' => {
167            'label' => "Propriétaire"
168        },
169        'create' => {
170            'label' => "Créé le"
171        },
172        'initials' => {
173            'label' => 'Initiales'
174        },
175        'locked' => {
176            'label' => "Verrouillé"
177        },
178        'nickname' => {
179            'label' => 'Nick'
180        },
181        'managedBy' => {
182            'label' => 'Responsable'
183        },
184        'homeDirectory' => {
185            'label' => 'Home'
186        },
187        'college' => {
188            'label' => 'College'
189        },
190        'manager' => {
191            'label' => 'Responsable'
192        },
193        'l' => {
194            'label' => 'Ville'
195        },
196        'managerContact' => {
197            'label' => 'Contact'
198        },
199        'site' => {
200            'label' => 'Site'
201        },
202        'postOfficeBox' => {
203            'label' => 'BP'
204        },
205        'exported' => {
206            'label' => "Propagé"
207        },
208        'expire' => {
209            'label' => 'Expire le'
210        },
211        'postalCode' => {
212            'label' => 'Code postal'
213        },
214        user => {
215            'label' => 'Utilisateur',
216        },
217        snNative => {
218            'label' => 'Nom d\'origine',
219        },
220        givenNameNative => {
221            'label' => 'Prénom d\'origine',
222        },
223        wWWHomePage  => {
224            label => 'Page Web',
225        },
226        halReference  => {
227            label => 'Identifiant Hal',
228        },
229        siteNick => {
230            label => 'Nom court',
231        },
232        otherName => {
233            label => 'Autre nom (A)',
234        },
235        outputD => {
236            label => 'Fichier de sortie',
237        },
238        templateD => {
239            label => 'ModÚle',
240        },
241        allow_dyn => {
242            label => 'Avec DHCP dyn.',
243        },
244        dynFrom => {
245            label => 'HÃŽtes dyn. depuis',
246        },
247        domain => {
248            label => 'Domaine',
249        },
250        ipCount => {
251            label => 'Nb d\'IP',
252        },
253        freeIPCount => {
254            label => 'Nb d\'IP libres',
255        },
256        dnsRevision => {
257            label => 'Révision DNS',
258        },
259        lastUpdate => {
260            label => 'DerniÚre MAJ',
261        },
262        reverse => {
263            label => 'Nom inverse',
264        },
265        finalpoint => {
266            label => 'Destinataires',
267        },
268        parents => {
269            label => 'Alias parents',
270        },
271        forward => {
272            label => 'Renvois',
273        },
274    },
275);
276
277my $config_file = '/etc/latmos-accounts/latmos-accounts-web.yml';
278if (-r $config_file ) {
279    __PACKAGE__->config( 'Plugin::ConfigLoader' => { 
280            file => $config_file 
281        } 
282    );
283}
284
285# http://stackoverflow.com/questions/1664816/is-there-a-way-to-force-c-urifor-in-catalyst-to-generate-a-uri-that-begins-wit
286__PACKAGE__->config( using_frontend_proxy => 1 );
287
288__PACKAGE__->config( name => 'LATMOS::Accounts::Web' );
289
290__PACKAGE__->config->{'Plugin::Authentication'} = {
291    default_realm => 'la',
292    realms => {
293        la => {
294            credential => {
295                class => 'La'
296            },
297            store => {
298                class => 'Null',
299            },
300        },
301    },
302};
303
304
305# Start the application
306__PACKAGE__->setup;
307
308
309=head1 NAME
310
311LATMOS::Accounts::Web - Catalyst based application
312
313=head1 SYNOPSIS
314
315    script/latmos_accounts_web_server.pl
316
317=head1 DESCRIPTION
318
319[enter your description here]
320
321=head1 SEE ALSO
322
323L<LATMOS::Accounts::Web::Controller::Root>, L<Catalyst>
324
325=head1 AUTHOR
326
327Thauvin Olivier
328
329=head1 LICENSE
330
331This library is free software, you can redistribute it and/or modify
332it under the same terms as Perl itself.
333
334=cut
335
3361;
Note: See TracBrowser for help on using the repository browser.