New manager

This commit is contained in:
Xavier Guimard 2009-12-11 18:17:00 +00:00
parent 04ed7be634
commit b301a5b5c8
103 changed files with 2290 additions and 3810 deletions

View File

@ -31,8 +31,8 @@ LASPPORTALDIR=$(DOCUMENTROOT)/liberty-alliance-sp-portal
RLASPPORTALDIR=$(DESTDIR)/$(LASPPORTALDIR)
MANAGERDIR=$(DOCUMENTROOT)/manager
RMANAGERDIR=$(DESTDIR)/$(MANAGERDIR)
MANAGERDATADIR=$(MANAGERDIR)/imgs
RMANAGERDATADIR=$(DESTDIR)/$(MANAGERDATADIR)
MANAGERSKINSDIR=$(MANAGERDIR)/skins
RMANAGERSKINSDIR=$(DESTDIR)/$(MANAGERSKINSDIR)
SESSIONSEXPLORERDIR=$(MANAGERDIR)
RSESSIONSEXPLORERDIR=$(DESTDIR)/$(SESSIONSEXPLORERDIR)
SESSIONSEXPLORERDATADIR=$(SESSIONSEXPLORERDIR)/images
@ -259,27 +259,33 @@ install_site: install_manager_site install_portal_site install_handler_site inst
install_manager_site: install_conf_dir
# Manager install
@install -v -d ${RMANAGERDIR} ${RMANAGERDATADIR} \
@install -v -d ${RMANAGERDIR} ${RMANAGERSKINSDIR} \
${RSESSIONSEXPLORERDIR} $(RSESSIONSEXPLORERDATADIR) \
$(RCONFDIR)
@find ${RMANAGERDIR} -type l -name imgs -delete
@find ${RMANAGERDIR} -type l -name images -delete
@cp -pR --remove-destination ${SRCMANAGERDIR}/example/* ${RMANAGERDIR}
@rm -rf $$(find ${RMANAGERDIR} -type d -name .svn) ${RMANAGERDIR}/scripts ${RMANAGERDIR}/mrtg ${RMANAGERDIR}/soapserver.pl
@if [ "${RMANAGERDIR}/imgs/" != "${RMANAGERDATADIR}/" ]; then \
mv -f ${RMANAGERDIR}/imgs/* ${RMANAGERDATADIR}/; \
rm -rf ${RMANAGERDIR}/imgs; \
ln -s $$(echo ${MANAGERDATADIR} | sed -e 's/\/$$//') ${RMANAGERDIR}/imgs; \
$(RCONFDIR) ${RMANAGERDIR}/skins/
@for skin in $$(ls lemonldap-ng-manager/example/skins/); do \
[ -h $(RMANAGERDIR)/skins/$$skin ] && rm -f $(RMANAGERDIR)/skins/$$skin; \
install -v -d $(RMANAGERSKINSDIR)/$$skin; \
done
@find ${RSESSIONSEXPLORERDIR} -type l -name images -delete
@cp -pR --remove-destination ${SRCMANAGERDIR}/example/index.pl ${RMANAGERDIR}
@perl -i -pe 's#__SKINDIR__#$(MANAGERDIR)/skins#; \
s#__APPSXMLFILE__#$(CONFDIR)/apps-list.xml#;' ${RMANAGERDIR}/index.pl
@cp -pR --remove-destination ${SRCMANAGERDIR}/example/skins/* $(RMANAGERSKINSDIR)
@if [ "$(MANAGERDIR)/skins/" != "$(MANAGERSKINSDIR)/" ]; then \
for skin in $$(ls lemonldap-ng-manager/example/skins/); do \
rm -rf $(RMANAGERDIR)/skins/$$skin/; \
ln -s $(MANAGERSKINSDIR)/$$skin $(RMANAGERDIR)/skins/$$skin; \
done; \
fi
@perl -i -pe 's/__DNSDOMAIN__/$(DNSDOMAIN)/g' $(RCONFDIR)/$(CONFFILENAME)
# Sessions explorer install
@if [ "${MANAGERDIR}" != "$(SESSIONSEXPLORERDIR)" ]; then mv -f ${RMANAGERDIR}/sessions.pl $(RSESSIONSEXPLORERDIR); fi
@if [ "${MANAGERDIR}/images/" != "${SESSIONSEXPLORERDATADIR}/" ]; then \
mv -f ${RMANAGERDIR}/images/* ${RSESSIONSEXPLORERDATADIR}; \
@cp -pR --remove-destination ${SRCMANAGERDIR}/example/{sessions.pl,images} $(RSESSIONSEXPLORERDIR)
@if [ "${SESSIONSEXPLORERDIR}/images/" != "${SESSIONSEXPLORERDATADIR}/" ]; then \
mv -f ${RSESSIONSEXPLORERDIR}/images/* ${RSESSIONSEXPLORERDATADIR}; \
rm -rf ${RMANAGERDIR}/images; \
ln -s $$(echo ${SESSIONSEXPLORERDATADIR} | sed -e 's/\/$$//') ${RMANAGERDIR}/images; \
fi
@rm -rf $$(find ${RMANAGERDIR} ${RMANAGERDATADIR} \
@rm -rf $$(find ${RMANAGERDIR} ${RMANAGERSKINSDIR} \
${RSESSIONSEXPLORERDIR} $(RSESSIONSEXPLORERDATADIR) \
$(RCONFDIR) -type d -name .svn)
@ -344,7 +350,7 @@ install_examples_site:
cp -dpR --remove-destination lemonldap-ng-$$i/example $(REXAMPLESDIR)/$$i; \
done
@rm -rf $(REXAMPLESDIR)/portal/skins \
$(REXAMPLESDIR)/manager/imgs \
$(REXAMPLESDIR)/manager/skins \
$(REXAMPLESDIR)/manager/images \
@rm -rf $$(find $(REXAMPLESDIR) -type d -name .svn)
@perl -i -pe 's#__DIR__#$(LASPPORTALDIR)#g' $(REXAMPLESDIR)/portal/AuthLA/index.pl
@ -459,7 +465,7 @@ manager_cpan: manager_conf
static_example: example
@mkdir -p ${EXAMPLESDIR}/static
@cd ${EXAMPLESDIR}/static/;cp -a ../manager/{imgs,theme} .;cd -
@cd ${EXAMPLESDIR}/static/;cp -a ../manager/{skins} .;cd -
@../scripts/make_static_example.pl ${DESTMANAGERDIR}/index.pl ${SCRIPTSDIR}/static/index.html $(EXAMPLELANG)
documentation:

View File

@ -1,11 +1,7 @@
debian/tmp/usr/share/perl5/Lemonldap/NG/Manager*
debian/tmp/usr/share/perl5/auto/Lemonldap/NG/Manager
debian/tmp/usr/share/man/man3/Lemonldap::NG::Manager.3pm
debian/tmp/usr/share/man/man3/Lemonldap::NG::Manager::SOAPServer.3pm
debian/tmp/usr/share/man/man3/Lemonldap::NG::Manager::Restricted.3pm
debian/tmp/etc/lemonldap-ng/apply.conf
debian/manager-apache*.conf /etc/lemonldap-ng
debian/tmp/usr/share/lemonldap-ng/manager-imgs
debian/tmp/usr/share/lemonldap-ng/manager-skins
debian/tmp/usr/share/lemonldap-ng/sessions-explorer-imgs
debian/tmp/var/lib/lemonldap-ng/manager
debian/tmp/usr/share/lemonldap-ng/bin/lmConfigEditor

View File

@ -1,131 +1,131 @@
# Copyright (C) 2009 Xavier Guimard <x.guimard@free.fr>
# This file is distributed under the same license as lemonldap-ng package.
# Hideki Yamane (Debian-JP) <henrich@debian.or.jp>, 2009.
#
msgid ""
msgstr ""
"Project-Id-Version: lemonldap-ng 0.9.4.1-2\n"
"Report-Msgid-Bugs-To: x.guimard@free.fr\n"
"POT-Creation-Date: 2007-09-22 13:08+0200\n"
"PO-Revision-Date: 2009-11-24 14:26+0900\n"
"Last-Translator: Hideki Yamane (Debian-JP) <henrich@debian.or.jp>\n"
"Language-Team: Japanese <debian-japanese@lists.debian.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:1001
msgid "LDAP server:"
msgstr "LDAP サーバ:"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:1001
msgid ""
"Set here name or IP address of the LDAP server that has to be used by "
"Lemonldap::NG. You can modify this value later using the Lemonldap::NG "
"manager."
msgstr ""
"Lemonldap::NG が利用する LDAP サーバの名前、あるいは IP アドレスをここで"
"設定してください。Lemonldap::NG マネージャを使えば、後ほどこの値を変更できます。"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:2001
msgid "Lemonldap::NG DNS domain:"
msgstr "Lemonldap::NG DNS ドメイン名:"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:2001
msgid ""
"Set here the main domain protected by Lemonldap::NG. You can modify this "
"value later using the Lemonldap::NG manager."
msgstr ""
"ここで、Lemonldap::NG で保護するメインのドメイン名を設定してください。"
"Lemonldap::NG マネージャを使えば、後ほどこの値を変更できます。"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:3001
msgid "Lemonldap::NG portal:"
msgstr "Lemonldap::NG ポータル::"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:3001
msgid ""
"Set here the Lemonldap::NG portal URL. You can modify this value later using "
"the Lemonldap::NG manager."
msgstr ""
"ここで、Lemonldap::NG ポータルの URL を設定してください。Lemonldap::NG "
"マネージャを使えば、後ほどこの値を変更できます。"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:4001
msgid "LDAP server port:"
msgstr "LDAP サーバのポート番号:"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:4001
msgid ""
"Set here the port used by the LDAP server. You can modify this value later "
"using the Lemonldap::NG manager."
msgstr ""
"ここで、LDAP サーバが使うポート番号を設定してください。Lemonldap::NG マネージャ"
"を使えば、後ほどこの値を変更できます。"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:5001
msgid "LDAP search base:"
msgstr "LDAP 検索ベース:"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:5001
msgid ""
"Set here the search base to use in LDAP queries. You can modify this value "
"later using the Lemonldap::NG manager."
msgstr ""
"ここで、LDAP クエリで利用する検索ベースを設定してください。Lemonldap::NG "
"ネージャを使えば、後ほどこの値を変更できます。"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:6001
msgid "LDAP account:"
msgstr "LDAP アカウント:"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:6001
msgid ""
"Set here the account that Lemonldap::NG has to use for its LDAP requests. "
"Leaving it blank causes Lemonldap::NG to use anonymous connections. You can "
"modify this value later using the Lemonldap::NG manager."
msgstr ""
"ここで、LDAP のリクエストに対して Lemonldap::NG が使う必要があるアカウントを設定"
"してください。この欄を空白のままにしておくと、Lemonldap::NG は匿名での接続を行う"
"ようになります。Lemonldap::NG マネージャを使えば、後ほどこの値を変更できます。"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:7001
msgid "LDAP password:"
msgstr "LDAP パスワード:"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:7001
msgid ""
"Set here the password for the Lemonldap::NG LDAP account. You can modify "
"this value later using the Lemonldap::NG manager."
msgstr ""
"Lemonldap::NG の LDAP アカウントのパスワードをここで設定してください。"
"Lemonldap::NG マネージャを使えば、後ほどこの値を変更できます。"
#
msgid ""
msgstr ""
"Project-Id-Version: lemonldap-ng 0.9.4.1-2\n"
"Report-Msgid-Bugs-To: x.guimard@free.fr\n"
"POT-Creation-Date: 2007-09-22 13:08+0200\n"
"PO-Revision-Date: 2009-11-24 14:26+0900\n"
"Last-Translator: Hideki Yamane (Debian-JP) <henrich@debian.or.jp>\n"
"Language-Team: Japanese <debian-japanese@lists.debian.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:1001
msgid "LDAP server:"
msgstr "LDAP サーバ:"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:1001
msgid ""
"Set here name or IP address of the LDAP server that has to be used by "
"Lemonldap::NG. You can modify this value later using the Lemonldap::NG "
"manager."
msgstr ""
"Lemonldap::NG が利用する LDAP サーバの名前、あるいは IP アドレスをここで設定"
"してください。Lemonldap::NG マネージャを使えば、後ほどこの値を変更できます。"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:2001
msgid "Lemonldap::NG DNS domain:"
msgstr "Lemonldap::NG DNS ドメイン名:"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:2001
msgid ""
"Set here the main domain protected by Lemonldap::NG. You can modify this "
"value later using the Lemonldap::NG manager."
msgstr ""
"ここで、Lemonldap::NG で保護するメインのドメイン名を設定してください。"
"Lemonldap::NG マネージャを使えば、後ほどこの値を変更できます。"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:3001
msgid "Lemonldap::NG portal:"
msgstr "Lemonldap::NG ポータル::"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:3001
msgid ""
"Set here the Lemonldap::NG portal URL. You can modify this value later using "
"the Lemonldap::NG manager."
msgstr ""
"ここで、Lemonldap::NG ポータルの URL を設定してください。Lemonldap::NG マネー"
"ジャを使えば、後ほどこの値を変更できます。"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:4001
msgid "LDAP server port:"
msgstr "LDAP サーバのポート番号:"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:4001
msgid ""
"Set here the port used by the LDAP server. You can modify this value later "
"using the Lemonldap::NG manager."
msgstr ""
"ここで、LDAP サーバが使うポート番号を設定してください。Lemonldap::NG マネー"
"ジャを使えば、後ほどこの値を変更できます。"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:5001
msgid "LDAP search base:"
msgstr "LDAP 検索ベース:"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:5001
msgid ""
"Set here the search base to use in LDAP queries. You can modify this value "
"later using the Lemonldap::NG manager."
msgstr ""
"ここで、LDAP クエリで利用する検索ベースを設定してください。Lemonldap::NG "
"ネージャを使えば、後ほどこの値を変更できます。"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:6001
msgid "LDAP account:"
msgstr "LDAP アカウント:"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:6001
msgid ""
"Set here the account that Lemonldap::NG has to use for its LDAP requests. "
"Leaving it blank causes Lemonldap::NG to use anonymous connections. You can "
"modify this value later using the Lemonldap::NG manager."
msgstr ""
"ここで、LDAP のリクエストに対して Lemonldap::NG が使う必要があるアカウントを"
"設定してください。この欄を空白のままにしておくと、Lemonldap::NG は匿名での接"
"続を行うようになります。Lemonldap::NG マネージャを使えば、後ほどこの値を変更"
"できます。"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:7001
msgid "LDAP password:"
msgstr "LDAP パスワード:"
#. Type: string
#. Description
#: ../liblemonldap-ng-conf-perl.templates:7001
msgid ""
"Set here the password for the Lemonldap::NG LDAP account. You can modify "
"this value later using the Lemonldap::NG manager."
msgstr ""
"Lemonldap::NG の LDAP アカウントのパスワードをここで設定してください。"
"Lemonldap::NG マネージャを使えば、後ほどこの値を変更できます。"

View File

@ -61,7 +61,7 @@ install: build
EXAMPLESDIR=/examples/ \
HANDLERDIR=$(LMVARDIR)handler/ \
PORTALSKINSDIR=$(LMSHAREDIR)portal-skins/ \
MANAGERDATADIR=$(LMSHAREDIR)manager-imgs/ \
MANAGERSKINSDIR=$(LMSHAREDIR)manager-skins/ \
SESSIONSEXPLORERDATADIR=$(LMSHAREDIR)sessions-explorer-imgs/ \
STORAGECONFFILE=/etc/lemonldap-ng/lemonldap-ng.ini \
TOOLSDIR=$(LMSHAREDIR)ressources/ \
@ -72,9 +72,7 @@ install: build
APACHEGROUP=www-data
# Since Lenny, jquery.js is provided by libjs-jquery
rm -f $(CURDIR)/debian/tmp$(LMSHAREDIR)portal-skins/*/jquery.js \
$(CURDIR)/debian/tmp$(LMVARDIR)manager/jquery.js \
debian/tmp/examples/manager/jquery.js
rm -f $(CURDIR)/debian/tmp$(LMSHAREDIR)*-skins/*/jquery.js
perl -i -pe 's#(["'"'"'])[\w-\./]*jquery.js#$$1/javascript/jquery/jquery.js#' \
$(CURDIR)/debian/tmp/examples/manager/*.pl \
$(CURDIR)/debian/tmp$(LMSHAREDIR)portal-skins/pastel/header.tpl

View File

@ -13,6 +13,7 @@ build_requires:
requires:
Cache::Cache: 0
CGI: 3.08
Config::IniFiles: 0
Crypt::Rijndael: 0
DBI: 0
HTTP::Headers: 0
@ -20,7 +21,6 @@ requires:
Regexp::Assemble: 0
SOAP::Lite: 0
Storable: 0
Config::IniFiles: 0
no_index:
directory:
- t

View File

@ -288,6 +288,33 @@ sub _sub {
}
}
##@method void translate_template(string text_ref, string lang)
# translate_template is used as an HTML::Template filter to tranlate strings in
# the wanted language
#@param text_ref reference to the string to translate
#@param lang optionnal language wanted. Falls to browser language instead.
#@return
sub translate_template {
my $self = shift;
my $text_ref = shift;
my $lang = shift || $ENV{HTTP_ACCEPT_LANGUAGE};
# Get the lang code (2 letters)
$lang = lc($lang);
$lang =~ s/-/_/g;
$lang =~ s/^(..).*$/$1/;
# Test if a translation is available for the selected language
# If not available, return the first translated string
# <lang en="Please enter your credentials" fr="Merci de vous autentifier"/>
if ( $$text_ref =~ m/$lang=\"(.*?)\"/ ) {
$$text_ref =~ s/<lang.*$lang=\"(.*?)\".*?\/>/$1/gx;
}
else {
$$text_ref =~ s/<lang\s+\w+=\"(.*?)\".*?\/>/$1/gx;
}
}
## @method private void quit()
# Simply exit.
sub quit {

View File

@ -30,73 +30,54 @@ example/images/tree.js
example/images/tree_line.gif
example/images/vframe.png
example/images/xlib.js
example/imgs/_customers.gif
example/imgs/blank.gif
example/imgs/book.gif
example/imgs/book_titel.gif
example/imgs/books_close.gif
example/imgs/books_open.gif
example/imgs/btn_up1.gif
example/imgs/btn_up2.gif
example/imgs/close2.gif
example/imgs/folderClosed.gif
example/imgs/folderOpen.gif
example/imgs/iconCheckAll.gif
example/imgs/iconCheckGray.gif
example/imgs/iconClient.gif
example/imgs/iconDeleteSelected.gif
example/imgs/iconJob.gif
example/imgs/iconReport.gif
example/imgs/iconTask.gif
example/imgs/iconTimeRecordsEdit.gif
example/imgs/iconUncheckAll.gif
example/imgs/item.gif
example/imgs/item2.gif
example/imgs/leaf.gif
example/imgs/line1.gif
example/imgs/line2.gif
example/imgs/line3.gif
example/imgs/line4.gif
example/imgs/magazines_close.gif
example/imgs/magazines_open.gif
example/imgs/minus.gif
example/imgs/minus2.gif
example/imgs/minus3.gif
example/imgs/minus4.gif
example/imgs/minus5.gif
example/imgs/minus_ar.gif
example/imgs/open2.gif
example/imgs/plus.gif
example/imgs/plus2.gif
example/imgs/plus3.gif
example/imgs/plus4.gif
example/imgs/plus5.gif
example/imgs/plus_ar.gif
example/imgs/tombs.gif
example/imgs/tombs_mag.gif
example/index.pl
example/jquery.js
example/lemonldap-ng-manager.js
example/mrtg/lmng-mrtg
example/mrtg/mrtg.cfg.example
example/scripts/lmConfigEditor
example/sessions.pl
example/theme/default.css
example/theme/hatch.gif
example/theme/logo_lemonldap-ng.png
example/skins/default/arrow_refresh.png
example/skins/default/collapsable-last.gif
example/skins/default/collapsable.gif
example/skins/default/cross.png
example/skins/default/disk.png
example/skins/default/expandable-last.gif
example/skins/default/expandable.gif
example/skins/default/folder_add.png
example/skins/default/folder_delete.png
example/skins/default/folder_edit.png
example/skins/default/hframe.png
example/skins/default/jquery.js
example/skins/default/leaf-last.gif
example/skins/default/leaf.gif
example/skins/default/line_bg.gif
example/skins/default/line_bg_over.gif
example/skins/default/line_bg_over_last.gif
example/skins/default/logo_lemonldap-ng.png
example/skins/default/manager.css
example/skins/default/manager.tpl
example/skins/default/minus.gif
example/skins/default/page_add.png
example/skins/default/page_delete.png
example/skins/default/page_edit.png
example/skins/default/plus.gif
example/skins/default/root.gif
example/skins/default/spacer.gif
example/skins/default/spinner.gif
example/skins/default/tree.js
example/skins/default/tree_line.gif
example/skins/default/vframe.png
example/skins/default/xlib.js
lib/Lemonldap/NG/Manager.pm
lib/Lemonldap/NG/Manager/_HTML.pm
lib/Lemonldap/NG/Manager/_i18n.pm
lib/Lemonldap/NG/Manager/_Response.pm
lib/Lemonldap/NG/Manager/_Struct.pm
lib/Lemonldap/NG/Manager/Downloader.pm
lib/Lemonldap/NG/Manager/Help.pm
lib/Lemonldap/NG/Manager/Restricted.pm
lib/Lemonldap/NG/Manager/Sessions.pm
lib/Lemonldap/NG/Manager/SOAPServer.pm
lib/Lemonldap/NG/Manager/Uploader.pm
Makefile.PL
MANIFEST
META.yml Module meta-data (added by MakeMaker)
MANIFEST This list of files
META.yml
README
t/10-Manager.t
t/20-Manager-i18n.t
t/99-pod.t
TODO

View File

@ -1,6 +1,6 @@
--- #YAML:1.0
name: Lemonldap-NG-Manager
version: 0.91
version: 0.92
abstract: Perl extension for managing Lemonldap::NG Web-SSO
author:
- Xavier Guimard <x.guimard@free.fr>

View File

@ -1,2 +0,0 @@
* system to alert if configuration as changed between get and update

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 947 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 B

View File

@ -1,42 +1,30 @@
#!/usr/bin/perl
use strict;
use Lemonldap::NG::Manager;
use HTML::Template;
our $skin_dir='skins';
our $main_dir='/var/lib/lemonldap-ng/manager';
our $skin='default';
my $h = new Lemonldap::NG::Manager(
my $manager = new Lemonldap::NG::Manager(
{
# REQUIRED PARAMETERS
dhtmlXTreeImageLocation => "/imgs/",
cssFile => 'theme/default.css',
textareaW => 50,
textareaH => 2,
inputSize => 30,
# OPTIONAL PARAMETERS
## PROTECTION, choose one of :
# * protection by manager
# protection => 'manager',
# * specify yourself the rule to apply (same as in the manager)
# protection => 'rule: $uid=admin',
# * all authenticate users are granted
# protection => 'authenticate',
# * nothing : not protected
#jsFile => /path/to/lemonldap-ng-manager.js,
applyConfFile => '/etc/lemonldap-ng//apply.conf',
# ACCESS TO CONFIGURATION
# By default, Lemonldap::NG uses the default lemonldap-ng.ini file to know
# By default, Lemonldap::NG uses the default storage.conf file to know
# where to find is configuration
# (generaly /etc/lemonldap-ng/lemonldap-ng.ini)
# (generaly /etc/lemonldap-ng/storage.conf)
# You can specify by yourself this file :
#configStorage => { confFile => '/path/to/my/file' },
#configStorage => { type => 'File', dirName => '/path/to/my/file' },
# You can also specify directly the configuration
# (see Lemonldap::NG::Handler::SharedConf(3))
#configStorage => {
# type => 'File',
# dirName => '/usr/local/lemonldap-ng/data/conf/'
# directory => '/usr/local/lemonlda-ng/conf/'
#},
# CUSTOM FUNCTION
@ -44,6 +32,16 @@ my $h = new Lemonldap::NG::Manager(
#customFunctions => 'function1 function2',
#customFunctions => 'Package::func1 Package::func2',
}
) or die "Unable to start";
) or Lemonldap::NG::Common::CGI->abort('Unable to start manager');
my $template = HTML::Template->new(
filename => "$main_dir/$skin_dir/$skin/manager.tpl",
die_on_bad_params => 0,
cache => 0,
filter => sub { $manager->translate_template(@_) },
);
$template->param(MENU => $manager->menu());
$template->param(DIR => "$skin_dir/$skin");
print $manager->header('text/html; charset=utf-8');
print $template->output;
$h->doall();

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 685 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 668 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 666 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 615 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -0,0 +1,230 @@
body
{
font: normal 12px arial, tahoma, helvetica, sans-serif;
margin:0;
padding:5px;
}
.simpleTree
{
overflow:auto;
margin:0;
padding:0;
/*
* width: 250px;
* height:350px;
* overflow:auto;
* border: 1px solid #444444;
* */
}
.simpleTree li
{
list-style: none;
margin:0;
padding:0 0 0 34px;
line-height: 14px;
}
.simpleTree li span
{
display:inline;
clear: left;
white-space: nowrap;
}
.simpleTree ul
{
margin:0;
padding:0;
}
.simpleTree .root
{
margin-left:-16px;
background: url(root.gif) no-repeat 16px 0 #ffffff;
}
.simpleTree .line
{
margin:0 0 0 -16px;
padding:0;
line-height: 3px;
height:3px;
font-size:3px;
background: url(line_bg.gif) 0 0 no-repeat transparent;
}
.simpleTree .line-last
{
margin:0 0 0 -16px;
padding:0;
line-height: 3px;
height:3px;
font-size:3px;
background: url(spacer.gif) 0 0 no-repeat transparent;
}
.simpleTree .line-over
{
margin:0 0 0 -16px;
padding:0;
line-height: 3px;
height:3px;
font-size:3px;
background: url(line_bg_over.gif) 0 0 no-repeat transparent;
}
.simpleTree .line-over-last
{
margin:0 0 0 -16px;
padding:0;
line-height: 3px;
height:3px;
font-size:3px;
background: url(line_bg_over_last.gif) 0 0 no-repeat transparent;
}
.simpleTree .folder-open
{
margin-left:-16px;
background: url(collapsable.gif) 0 -2px no-repeat #fff;
}
.simpleTree .folder-open-last
{
margin-left:-16px;
background: url(collapsable-last.gif) 0 -2px no-repeat #fff;
}
.simpleTree .folder-close
{
margin-left:-16px;
background: url(expandable.gif) 0 -2px no-repeat #fff;
}
.simpleTree .folder-close-last
{
margin-left:-16px;
background: url(expandable-last.gif) 0 -2px no-repeat #fff;
}
.simpleTree .doc
{
margin-left:-16px;
background: url(leaf.gif) 0 -1px no-repeat #fff;
}
.simpleTree .doc-last
{
margin-left:-16px;
background: url(leaf-last.gif) 0 -1px no-repeat #fff;
}
.simpleTree .ajax
{
background: url(spinner.gif) no-repeat 0 0 #ffffff;
height: 16px;
display:none;
}
.simpleTree .ajax li
{
display:none;
margin:0;
padding:0;
}
.simpleTree .trigger
{
display:inline;
margin-left:-32px;
width: 28px;
height: 11px;
cursor:pointer;
}
.simpleTree .text
{
cursor: default;
}
.simpleTree .active
{
cursor: default;
background-color:#F7BE77;
padding:0px 2px;
border: 1px dashed #444;
}
#drag_container
{
background:#ffffff;
color:#000;
font: normal 11px arial, tahoma, helvetica, sans-serif;
border: 1px dashed #767676;
}
#drag_container ul
{
list-style: none;
padding:0;
margin:0;
}
#drag_container li
{
list-style: none;
background-color:#ffffff;
line-height:18px;
white-space: nowrap;
padding:1px 1px 0px 16px;
margin:0;
}
#drag_container li span
{
padding:0;
}
#drag_container li.doc, #drag_container li.doc-last
{
background: url(leaf.gif) no-repeat -17px 0 #ffffff;
}
#drag_container .folder-close, #drag_container .folder-close-last
{
background: url(expandable.gif) no-repeat -17px 0 #ffffff;
}
#drag_container .folder-open, #drag_container .folder-open-last
{
background: url(collapsable.gif) no-repeat -17px 0 #ffffff;
}
.content
{
display: block;
}
.hidden
{
display: none;
}
/* xSplitter Styles */
.clsSplitter
{
position: absolute;
overflow: hidden;
visibility: hidden;
margin: 0;
padding: 0;
background: #FFF;
border: none;
}
.clsPane
{
position: absolute;
overflow: auto;
visibility: visible;
margin: 0;
padding: 0;
background: #FFF;
border: none;
}
.clsDragBar
{
position: absolute;
overflow: hidden;
visibility: visible;
margin: 0;
padding: 0;
background: lightgrey;
border: none;
}
.clsTemporaryContainer /* replace this with something like xFenster */
{
position: relative;
overflow: visible;
visibility: visible;
background: transparent;
border: none;
}
#idSplitter3 { border: 4px solid lightgrey; }

View File

@ -0,0 +1,95 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head>
<title>Lemonldap::NG Manager</title>
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="DIR">/manager.css" />
<script src="<TMPL_VAR NAME="DIR">/xlib.js" type="text/JavaScript"></script>
<script src="<TMPL_VAR NAME="DIR">/jquery.js" type="text/JavaScript"></script>
<script src="<TMPL_VAR NAME="DIR">/tree.js" type="text/JavaScript"></script>
<script type="text/JavaScript">//<![CDATA[
var scriptname='/experimental.cgi';var imagepath='<TMPL_VAR NAME="DIR">/';
//]]></script>
<script src="/images//manager.js" type="text/JavaScript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
</head>
<body>
<div class="clsTemporaryContainer">
<div style="visibility: visible;" id="idSplitter3" class="clsSplitter">
<div style="z-index: 2;" id="gauche" class="clsPane">
<img style="padding:4px;padding-left:12px;" alt="Lemonldap::NG" src="<TMPL_VAR NAME="DIR">/logo_lemonldap-ng.png"/><br/>&nbsp;
<TMPL_VAR NAME="MENU">
</div><!-- end Pane -->
<div style="overflow: hidden; z-index: 2;" id="droit" class="clsPane">
<div style="visibility: visible;" id="idSplitter32" class="clsSplitter">
<div style="z-index: 2;overflow:auto;height:500px;" id="haut" class="clsPane">
<h2 id="content_title">Lemonldap::NG Manager</h2>
<div id="buttons">
<button id="bsave" onclick="$.post(scriptname,{data: $('#li_cm9vdA2').html()},function(data){return 1},'html');" >
<lang en="Save" fr="Sauver" />
</button>
<button id="bapply" onclick="$.post(scriptname,{apply:1},function(data){return 1},'html');" >
<lang en="Apply" fr="Appliquer" />
</button>
<button id="newkbr" style="display:none;" onclick="newKeyR();return false;">
<lang en="New key" fr="Nouvelle clef" />
</button>
<button id="newrbr" style="display:none;" onclick="newRuleR();return false;">
<lang en="New rule" fr="Nouvelle règle" />
</button>
<button id="newkb" style="display:none;" onclick="newKey();return false;">
<lang en="New key" fr="Nouvelle clef" />
</button>
<button id="newrb" style="display:none;" onclick="newRule();return false;">
<lang en="New rule" fr="Nouvelle règle" />
</button>
<button id="delkb" style="display:none;" onclick="delKey();return false;">
<lang en="Delete key" fr="Effacer la clef" />
</button>
</div>
<form action="#" onsubmit="return false">
<div id="content">
<div id="content_default" class="content">
Default
</div>
<div id="content_text" class="hidden">
<input type="text" id="text" onchange="setlmdata(currentId,this.value)"/>
<button onclick="return false">Valider</button>
</div>
<div id="content_securedCookie" class="hidden">
<input id="securedCookie0" type="radio" name="securedCookie" value="0" onclick="setlmdata('li_bGlfL3NlY3VyZWRDb29raWU1','0')" /> Cookie non sécurisé <br/>
<input id="securedCookie1" type="radio" name="securedCookie" value="1" onclick="setlmdata('li_bGlfL3NlY3VyZWRDb29raWU1','1')" /> Cookie sécurisé <br/>
<input id="securedCookie2" type="radio" name="securedCookie" value="2" onclick="setlmdata('li_bGlfL3NlY3VyZWRDb29raWU1','2')" /> 2 cookies <br/>
<button onclick="return false">Valider</button>
</div>
<div id="content_int" class="hidden">
<input type="text" id="int" onchange="setlmdata(currentId,this.value)"/>
<button onclick="return false">Valider</button>
</div>
<div id="content_btext" class="hidden">
<input type="text" id="btextKey" onchange="setlmtext(currentId,this.value)"/> <input type="text" id="btextValue" onchange="setlmdata(currentId,this.value)"/>
<button onclick="return false">Valider</button>
</div>
<div id="content_rules" class="hidden">
<textarea id="rulKey" cols="30" rows="2" onchange="setlmtext(currentId,this.value)"></textarea>&nbsp;<textarea id="rulValue" cols="50" rows="2" onchange="setlmdata(currentId,this.value)"></textarea>
<button onclick="return false">Valider</button>
</div>
</div></form>
</div><!-- end Pane -->
<div style="z-index: 2;" id="bas" class="clsPane">
<div id="help">
</div>
</div><!-- end Pane -->
<div style="z-index: 1; cursor: n-resize;" id="barre2" class="clsDragBar clsDragBar-hframe">
&nbsp;
</div>
</div><!-- end Splitter -->
</div><!-- end Pane -->
<div style="z-index: 1; cursor: n-resize;" id="barre3" class="clsDragBar clsDragBar-vframe">
</div>
</div><!-- end Splitter -->
</div><!-- end TemporaryContainer -->
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 739 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 740 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 807 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1004 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,475 @@
/*
* jQuery SimpleTree Drag&Drop plugin
* Update on 22th May 2008
* Version 0.3
*
* Licensed under BSD <http://en.wikipedia.org/wiki/BSD_License>
* Copyright (c) 2008, Peter Panov <panov\@elcat.kg>, IKEEN Group http://www.ikeen.com
* All rights reserved.
*
* Modified by Xavier Guimard <x.guimard@free.fr> for Lemonldap::NG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Peter Panov, IKEEN Group nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY Peter Panov, IKEEN Group ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL Peter Panov, IKEEN Group BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
$.fn.simpleTree = function(opt){
return this.each(function(){
var TREE = this;
var ROOT = $('.root',this);
var mousePressed = false;
var mouseMoved = false;
var dragMoveType = false;
var dragNode_destination = false;
var dragNode_source = false;
var dragDropTimer = false;
var ajaxCache = Array();
TREE.option = {
drag: true,
animate: false,
autoclose: false,
speed: 'fast',
afterAjax: false,
afterMove: false,
afterClick: false,
afterDblClick: false,
// added by Erik Dohmen (2BinBusiness.nl) to make context menu cliks available
afterContextMenu: false,
docToFolderConvert:false
};
TREE.option = $.extend(TREE.option,opt);
$.extend(this, {getSelected: function(){
return $('span.active', this).parent();
}});
TREE.closeNearby = function(obj)
{
$(obj).siblings().filter('.folder-open, .folder-open-last').each(function(){
var childUl = $('>ul',this);
var className = this.className;
this.className = className.replace('open','close');
if(TREE.option.animate)
{
childUl.animate({height:"toggle"},TREE.option.speed);
}else{
childUl.hide();
}
});
};
TREE.nodeToggle = function(obj)
{
var childUl = $('>ul',obj);
if(childUl.is(':visible')){
obj.className = obj.className.replace('open','close');
if(TREE.option.animate)
{
childUl.animate({height:"toggle"},TREE.option.speed);
}else{
childUl.hide();
}
}else{
obj.className = obj.className.replace('close','open');
if(TREE.option.animate)
{
childUl.animate({height:"toggle"},TREE.option.speed, function(){
if(TREE.option.autoclose)TREE.closeNearby(obj);
if(childUl.is('.ajax'))TREE.setAjaxNodes(childUl, obj.id);
});
}else{
childUl.show();
if(TREE.option.autoclose)TREE.closeNearby(obj);
if(childUl.is('.ajax'))TREE.setAjaxNodes(childUl, obj.id);
}
}
};
TREE.setAjaxNodes = function(node, parentId, callback)
{
if($.inArray(parentId,ajaxCache) == -1){
ajaxCache[ajaxCache.length]=parentId;
var url = $.trim($('>li', node).text());
if(url && url.indexOf('url:'))
{
url=$.trim(url.replace(/.*\{url:(.*)\}/i ,'$1'));
var js='';
if(url.indexOf(',js:')){
js=$.trim(url.replace(/.*,js:(.*)/i ,'$1'));
url=$.trim(url.replace(/,js:.*/i ,''));
}
$.ajax({
type: "GET",
url: url,
contentType:'html',
cache:false,
success: function(responce){
node.removeAttr('class');
node.html(responce);
$.extend(node,{url:url});
if($('li',node).length==0)TREE.convertToFolder(node.parent());
TREE.setTreeNodes(node, true);
if(typeof TREE.option.afterAjax == 'function')
{
TREE.option.afterAjax(node);
}
if(typeof callback == 'function')
{
callback(node);
}
if(js.length)$('>span',node.parent()).click(function(){eval(js+'()')});
}
});
}
}
};
TREE.setTreeNodes = function(obj, useParent){
obj = useParent? obj.parent():obj;
$('li>span', obj).addClass('text')
.bind('selectstart', function() {
return false;
}).click(function(){
$('.active',TREE).attr('class','text');
if(this.className=='text')
{
this.className='active';
}
if(typeof TREE.option.afterClick == 'function')
{
TREE.option.afterClick($(this).parent());
}
return false;
}).dblclick(function(){
mousePressed = false;
TREE.nodeToggle($(this).parent().get(0));
if(typeof TREE.option.afterDblClick == 'function')
{
TREE.option.afterDblClick($(this).parent());
}
return false;
// added by Erik Dohmen (2BinBusiness.nl) to make context menu actions
// available
}).bind("contextmenu",function(){
$('.active',TREE).attr('class','text');
if(this.className=='text')
{
this.className='active';
}
if(typeof TREE.option.afterContextMenu == 'function')
{
TREE.option.afterContextMenu($(this).parent());
}
return false;
}).mousedown(function(event){
mousePressed = true;
cloneNode = $(this).parent().clone();
var LI = $(this).parent();
if(TREE.option.drag)
{
$('>ul', cloneNode).hide();
$('body').append('<div id="drag_container"><ul></ul></div>');
$('#drag_container').hide().css({opacity:'0.8'});
$('#drag_container >ul').append(cloneNode);
$("<img>").attr({id : "tree_plus",src : "plus.gif"}).css({width: "7px",display: "block",position: "absolute",left : "5px",top: "5px", display:'none'}).appendTo("body");
$(document).bind("mousemove", {LI:LI}, TREE.dragStart).bind("mouseup",TREE.dragEnd);
}
return false;
}).mouseup(function(){
if(mousePressed && mouseMoved && dragNode_source)
{
TREE.moveNodeToFolder($(this).parent());
}
TREE.eventDestroy();
});
$('li', obj).each(function(i){
var className = this.className;
var open = false;
var cloneNode=false;
var LI = this;
var childNode = $('>ul',this);
if(childNode.size()>0){
var setClassName = 'folder-';
if(className && className.indexOf('open')>=0){
setClassName=setClassName+'open';
open=true;
}else{
setClassName=setClassName+'close';
}
this.className = setClassName + ($(this).is(':last-child')? '-last':'');
if(!open || className.indexOf('ajax')>=0)childNode.hide();
TREE.setTrigger(this);
}else{
var setClassName = 'doc';
this.className = setClassName + ($(this).is(':last-child')? '-last':'');
}
}).before('<li class="line">&nbsp;</li>')
.filter(':last-child').after('<li class="line-last"></li>');
TREE.setEventLine($('.line, .line-last', obj));
};
TREE.setTrigger = function(node){
$('>span',node).before('<img class="trigger" src="'+imagepath+'spacer.gif" border=0>');
var trigger = $('>.trigger', node);
trigger.click(function(event){
TREE.nodeToggle(node);
});
if(!$.browser.msie)
{
trigger.css('float','left');
}
};
TREE.dragStart = function(event){
var LI = $(event.data.LI);
if(mousePressed)
{
mouseMoved = true;
if(dragDropTimer) clearTimeout(dragDropTimer);
if($('#drag_container:not(:visible)')){
$('#drag_container').show();
LI.prev('.line').hide();
dragNode_source = LI;
}
$('#drag_container').css({position:'absolute', "left" : (event.pageX + 5), "top": (event.pageY + 15) });
if(LI.is(':visible'))LI.hide();
var temp_move = false;
if(event.target.tagName.toLowerCase()=='span' && $.inArray(event.target.className, Array('text','active','trigger'))!= -1)
{
var parent = event.target.parentNode;
var offs = $(parent).offset({scroll:false});
var screenScroll = {x : (offs.left - 3),y : event.pageY - offs.top};
var isrc = $("#tree_plus").attr('src');
var ajaxChildSize = $('>ul.ajax',parent).size();
var ajaxChild = $('>ul.ajax',parent);
screenScroll.x += 19;
screenScroll.y = event.pageY - screenScroll.y + 5;
if(parent.className.indexOf('folder-close')>=0 && ajaxChildSize==0)
{
if(isrc.indexOf('minus')!=-1)$("#tree_plus").attr('src','plus.gif');
$("#tree_plus").css({"left": screenScroll.x, "top": screenScroll.y}).show();
dragDropTimer = setTimeout(function(){
parent.className = parent.className.replace('close','open');
$('>ul',parent).show();
}, 700);
}else if(parent.className.indexOf('folder')>=0 && ajaxChildSize==0){
if(isrc.indexOf('minus')!=-1)$("#tree_plus").attr('src','plus.gif');
$("#tree_plus").css({"left": screenScroll.x, "top": screenScroll.y}).show();
}else if(parent.className.indexOf('folder-close')>=0 && ajaxChildSize>0)
{
mouseMoved = false;
$("#tree_plus").attr('src','minus.gif');
$("#tree_plus").css({"left": screenScroll.x, "top": screenScroll.y}).show();
$('>ul',parent).show();
/*
Thanks for the idea of Erik Dohmen
*/
TREE.setAjaxNodes(ajaxChild,parent.id, function(){
parent.className = parent.className.replace('close','open');
mouseMoved = true;
$("#tree_plus").attr('src','plus.gif');
$("#tree_plus").css({"left": screenScroll.x, "top": screenScroll.y}).show();
});
}else{
if(TREE.option.docToFolderConvert)
{
$("#tree_plus").css({"left": screenScroll.x, "top": screenScroll.y}).show();
}else{
$("#tree_plus").hide();
}
}
}else{
$("#tree_plus").hide();
}
return false;
}
return true;
};
TREE.dragEnd = function(){
if(dragDropTimer) clearTimeout(dragDropTimer);
TREE.eventDestroy();
};
TREE.setEventLine = function(obj){
obj.mouseover(function(){
if(this.className.indexOf('over')<0 && mousePressed && mouseMoved)
{
this.className = this.className.replace('line','line-over');
}
}).mouseout(function(){
if(this.className.indexOf('over')>=0)
{
this.className = this.className.replace('-over','');
}
}).mouseup(function(){
if(mousePressed && dragNode_source && mouseMoved)
{
dragNode_destination = $(this).parents('li:first');
TREE.moveNodeToLine(this);
TREE.eventDestroy();
}
});
};
TREE.checkNodeIsLast = function(node)
{
if(node.className.indexOf('last')>=0)
{
var prev_source = dragNode_source.prev().prev();
if(prev_source.size()>0)
{
prev_source[0].className+='-last';
}
node.className = node.className.replace('-last','');
}
};
TREE.checkLineIsLast = function(line)
{
if(line.className.indexOf('last')>=0)
{
var prev = $(line).prev();
if(prev.size()>0)
{
prev[0].className = prev[0].className.replace('-last','');
}
dragNode_source[0].className+='-last';
}
};
TREE.eventDestroy = function()
{
// added by Erik Dohmen (2BinBusiness.nl), the unbind mousemove TREE.dragStart action
// like this other mousemove actions binded through other actions ain't removed (use it myself
// to determine location for context menu)
$(document).unbind('mousemove',TREE.dragStart).unbind('mouseup').unbind('mousedown');
$('#drag_container, #tree_plus').remove();
if(dragNode_source)
{
$(dragNode_source).show().prev('.line').show();
}
dragNode_destination = dragNode_source = mousePressed = mouseMoved = false;
//ajaxCache = Array();
};
TREE.convertToFolder = function(node){
node[0].className = node[0].className.replace('doc','folder-open');
node.append('<ul><li class="line-last"></li></ul>');
TREE.setTrigger(node[0]);
TREE.setEventLine($('.line, .line-last', node));
};
TREE.convertToDoc = function(node){
$('>ul', node).remove();
$('img', node).remove();
node[0].className = node[0].className.replace(/folder-(open|close)/gi , 'doc');
};
TREE.moveNodeToFolder = function(node)
{
if(!TREE.option.docToFolderConvert && node[0].className.indexOf('doc')!=-1)
{
return true;
}else if(TREE.option.docToFolderConvert && node[0].className.indexOf('doc')!=-1){
TREE.convertToFolder(node);
}
TREE.checkNodeIsLast(dragNode_source[0]);
var lastLine = $('>ul >.line-last', node);
if(lastLine.size()>0)
{
TREE.moveNodeToLine(lastLine[0]);
}
};
TREE.moveNodeToLine = function(node){
TREE.checkNodeIsLast(dragNode_source[0]);
TREE.checkLineIsLast(node);
var parent = $(dragNode_source).parents('li:first');
var line = $(dragNode_source).prev('.line');
$(node).before(dragNode_source);
$(dragNode_source).before(line);
node.className = node.className.replace('-over','');
var nodeSize = $('>ul >li', parent).not('.line, .line-last').filter(':visible').size();
if(TREE.option.docToFolderConvert && nodeSize==0)
{
TREE.convertToDoc(parent);
}else if(nodeSize==0)
{
parent[0].className=parent[0].className.replace('open','close');
$('>ul',parent).hide();
}
// added by Erik Dohmen (2BinBusiness.nl) select node
if($('span:first',dragNode_source).attr('class')=='text')
{
$('.active',TREE).attr('class','text');
$('span:first',dragNode_source).attr('class','active');
}
if(typeof(TREE.option.afterMove) == 'function')
{
var pos = $(dragNode_source).prevAll(':not(.line)').size();
TREE.option.afterMove($(node).parents('li:first'), $(dragNode_source), pos);
}
};
TREE.addNode = function(id, text, callback)
{
var temp_node = $('<li><ul><li id="'+id+'"><span>'+text+'</span></li></ul></li>');
TREE.setTreeNodes(temp_node);
dragNode_destination = TREE.getSelected();
dragNode_source = $('.doc-last',temp_node);
TREE.moveNodeToFolder(dragNode_destination);
temp_node.remove();
if(typeof(callback) == 'function')
{
callback(dragNode_destination, dragNode_source);
}
};
TREE.newNodeAfter = function(id, text, callback)
{
var temp_node = $('<li><ul><li id="'+id+'"><span>'+text+'</span></li></u></li>');
TREE.setTreeNodes(temp_node,true);
destination = TREE.getSelected().parent().parent();
dragNode_source = $('.doc-last',temp_node);
TREE.moveNodeToFolder(destination);
temp_node.remove();
if(typeof(callback) == 'function')
{
callback(dragNode_destination, dragNode_source);
}
//existing.after(temp_node);
//temp_node.remove();
};
TREE.delNode = function(callback)
{
dragNode_source = TREE.getSelected();
TREE.checkNodeIsLast(dragNode_source[0]);
dragNode_source.prev().remove();
dragNode_source.remove();
if(typeof(callback) == 'function')
{
callback(dragNode_destination);
}
};
TREE.init = function(obj)
{
TREE.setTreeNodes(obj, false);
};
TREE.init(ROOT);
});
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

File diff suppressed because one or more lines are too long

View File

@ -1,67 +0,0 @@
/* CSS for LemonLDAP::NG Manager */
body {
font-family: Arial, Helvetica, Verdana;
margin: 0;
padding: 0;
}
#gauche {
background: #dfdfdf url(hatch.gif);
}
#haut {
background: #eee;
}
#bas {
background: #ccc url(hatch.gif);
}
#treeBox {
background: url(logo_lemonldap-ng.png) no-repeat center 5px;
padding: 50px 0 0 0;
font-weight: bold;
}
#buttons {
margin: 20px 40px;
padding: 5px;
background: #fff;
border: 1px #ccc dashed;
}
#formulaire {
margin: 20px 40px;
}
input, textarea {
border: 1px #ccc solid;
padding: 3px;
}
table {
border-collapse: collapse;
}
#formulaire th {
background: #ddd url(hatch.gif);
}
#formulaire td {
padding: 5px;
text-align: center;
}
h1, h2, h3, h4, h5, h6, dt {
color: #d9b500;
font-weight: bold;
}
pre, code {
font: 10pt monospace;
border-left: 5px gray solid;
padding: 5px;
margin: 0 10px;
background: #ccc;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 B

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,276 @@
package Lemonldap::NG::Manager::Downloader;
use MIME::Base64;
# TODO
use Data::Dumper;
require Lemonldap::NG::Manager::_Struct; #inherits
require Lemonldap::NG::Manager::_i18n; #inherits
sub node {
my ( $self, $node ) = @_;
my $res;
$node =~ s/^\///;
#$self->lmLog( "Processing to node: $node", 'debug' );
if ( my ( $tmp, $help, $js ) = $self->corresp($node) ) {
# Menu node
if ( ref($tmp) ) {
# Scan subnodes
foreach ( @{ $tmp->{_nodes} } ) {
my $flag = ( $_ =~ s/^(\w+):// ? $1 : '' );
my ( $target, $_h, $_j ) = split /:\s*/;
$help ||= $_h;
# subnode is an ajax subnode
if ( $flag =~ /^(c?)n$/ ) {
$res .= $self->ajaxNode(
( $1 ? $target : "$node/$target" ),
"$target",
"node=$node/$target",
$tmp->{$target}->{_help} || $help,
$tmp->{$target}->{_js}
);
}
# subnode is a node
elsif ( ref( $tmp->{$target} ) ) {
$res .= $self->li( "$node/$target", "closed" )
. $self->span(
"$node/$target", $target, '',
$tmp->{$target}->{_js},
$tmp->{$target}->{_help} || $help
) . "<ul>";
$res .= $self->node("$node/$target");
$res .= "</ul></li>";
}
# subnode points to a configuration node
elsif ( $flag =~ /^n?hash$/ ) {
$res .= $self->confNode( $node, "$flag:$target", $help, $_j );
}
else {
$res .= $self->node("$node/$target");
}
}
}
# node points to a configuration point
else {
$res .= $self->confNode( $node, $tmp, $help, $js );
}
}
else {
$self->lmLog( "$node was not found in tree\n", 'error' );
}
return $res;
}
sub confNode {
my ( $self, $node, $target, $help, $js ) = @_;
my $res;
$self->lmLog( "Processing to configuration node: $target", 'debug' );
$target =~ s/^\///;
if ( $target =~ /^(.+?):(?!\/)(.+?):(?!\/)(.+?)$/ ) {
( $target, $help, $js ) = ( $1, $2, $3 );
}
# Hash datas downloaded later by ajax if needed
if ( $target =~ s/^nhash:// ) {
my $h = $self->keyToH( $target, $self->conf );
return unless ($h);
foreach ( sort keys %$h ) {
if ( ref($h) ) {
$res .= $self->ajaxNode( "$target/$_", $_, "node=$node/$_\&amp;key=$_",
$help, $js, undef, 1 );
}
else {
$res .= $self->confNode( "$target/$_", "btext:$target/$_", $help, $js );
}
}
}
# Hash datas
elsif ( $target =~ s/^hash:// ) {
my $h = $self->keyToH( $target, $self->conf );
return unless ($h);
foreach ( sort keys %$h ) {
if ( ref( $h->{$_} ) ) {
$res .= $self->confNode( "$target/$_", $help, $js );
}
else {
$js ||= 'btext';
my $id = "$target/$_";
$id =~ s/=*$//;
# Here, "notranslate" is set to true : hash values must not be
# translated
$res .= $self->li($id)
. $self->span( $id, "$_", $h->{$_}, $js, $help, 1 ) . "</li>";
}
}
}
else {
$target =~ s/^(\w+)://;
my $type = $1 || 'text';
$js ||= $type;
my $text = $target;
$text =~ s/^.*\///;
my $h = $self->keyToH( $target, $self->conf );
$h = $self->keyToH( $target, $self->defaultConf ) unless ( defined $h );
unless ( defined $h ) {
$self->lmLog( "$target does not exists in menu hash", "warn" );
return;
}
if ( ref($h) ) {
$res .= $self->li( "$target", "closed" )
. $self->span( "$target", $text, '', $js, $help ) . "<ul>";
foreach ( sort keys %$h ) {
if ( ref( $h->{$_} ) ) {
$res .= $self->confNode( '', "btext:$target/$_", $help, $js );
}
else {
my $id = "$target/$_";
$res .= $self->li($id)
. $self->span( $id, $_, $h->{$_}, $js, $help ) . "</li>";
}
}
$res .= '</ul></li>';
}
else {
my $id = "$target";
$res .= $self->li($id)
. $self->span( $id, $text, $h, $js, $help ) . "</li>";
}
}
return $res;
}
sub keyToH {
my ( $self, $key, $h ) = @_;
$key =~ s/^\///;
foreach ( split /\//, $key ) {
return () unless ( defined( $h->{$_} ) );
$h = $h->{$_};
}
return $h;
}
sub corresp {
my ( $self, $key, $last ) = @_;
$key =~ s/^\///;
my $h = $self->struct();
return $h unless ($key);
if ( my $k2 = $self->param('key') ) {
$h = $self->cstruct( $h, $k2 );
}
my @tmp1 = split /\//, $key;
my $help;
my $js;
while ( $_ = shift(@tmp1) ) {
if ( ref($h) and defined $h->{$_} ) {
$help = $h->{_help} if ( $h->{_help} );
$js = $h->{_js} if ( $h->{_js} );
$h = $h->{$_};
}
# The wanted key does not exists
elsif ( ref($h) ) {
unless ($last) {
$self->param( 'key', $_ );
return $self->corresp( $key, 1 );
}
else {
$self->lmLog( "Key $key does not exist in configuration hash",
'error' );
return ();
}
}
# If the key does not exist in manager tree, it must be defined in
# configuration hash
else {
return "$h/" . join( '/', $_, @tmp1 );
}
}
if ( ref($h) ) {
$help = $h->{_help} if ( $h->{_help} );
$js = $h->{_js} if ( $h->{_js} );
}
return $h, $help, $js;
}
sub conf {
my $self = shift;
return $self->{_conf} if ( $self->{_conf} );
my $args = { cfgNum => $self->{cfgNum} };
$args->{noCache} = 1 if ( $self->param('cfgNum') );
$self->{_conf} = $self->confObj->getConf($args);
$self->abort( 'Unable to get configuration',
$Lemonldap::NG::Common::Conf::msg )
unless ( $self->{_conf} );
return $self->{_conf};
}
sub confObj {
my $self = shift;
return $self->{_confObj} if ( $self->{_confObj} );
$self->{_confObj} =
Lemonldap::NG::Common::Conf->new( $self->{configStorage} );
$self->abort(
'Unable to access to configuration',
$Lemonldap::NG::Common::Conf::msg
) unless ( $self->{_confObj} );
$self->lmLog( $Lemonldap::NG::Common::Conf::msg, 'debug' )
if ($Lemonldap::NG::Common::Conf::msg);
return $self->{_confObj};
}
## @method protected void ajaxnode(string id, string text, string param)
# Display tree node with Ajax functions inside for opening the node.
# @param $id HTML id of the element.
# @param $text text to display
# @param $param Parameters for the Ajax query
sub ajaxNode {
my ( $self, $id, $text, $param, $help, $js, $data, $noT ) = @_;
$param .= "&amp;cfgNum=$self->{cfgNum}";
return $self->li($id)
. $self->span( $id, $text, $data, undef, $help, $noT )
. "<ul class=\"ajax\">"
. $self->li("sub_$id")
. ".{url:$ENV{SCRIPT_NAME}?$param"
. ( $js ? ",js:$js" : '' )
. "}</li></ul></li>\n";
}
sub span {
my ( $self, $id, $text, $data, $js, $help, $noT ) = @_;
use Carp qw(cluck);
cluck('dd') if ( $js eq 'default' );
my $tmp = $text;
$data = '' unless ( defined $data );
$js ||= "none";
$id = "li_" . encode_base64( $id, '' );
$id =~ s/(=*)$/length($1)/e;
$data =~ s/"/&#39;/g;
$tmp =~ s/"/&#39;/g;
$text = join ' ', map { $self->translate($_) } split /\s+/, $text unless($noT);
$text = $self->escapeHTML($text);
return
"<span name=\"$tmp\" id=\"text_$id\" onclick=\"$js('$id')\" help=\"$help\" value=\"$data\">$text</span>
";
}
sub li {
my ( $self, $id, $class ) = @_;
$id = "li_" . encode_base64( $id, '' );
$id =~ s/(=*)$/length($1)/e;
return "<li id=\"$id\"" . ( $class ? " class=\"$class\">" : ">" );
}
1;

View File

@ -6,7 +6,7 @@
package Lemonldap::NG::Manager::Help;
use AutoLoader qw(AUTOLOAD);
our $VERSION = '0.4';
our $VERSION = '0.5';
## @fn void import(string lang)
# Import help messages subroutines in Lemonldap::NG::Manager in the wanted language.

View File

@ -1,174 +0,0 @@
## @file
# Restricted manager
## @class
# Restrict Lemonldap::NG::Manager to build custom manager interfaces.
package Lemonldap::NG::Manager::Restricted;
use strict;
use Lemonldap::NG::Manager;
use Lemonldap::NG::Common::Conf::Constants; #inherits
use base qw(Lemonldap::NG::Manager);
our $VERSION = '0.11';
## @cmethod Lemonldap::NG::Manager::Restricted new(hashref args)
# Constructor
# @param $args parameters for Lemonldap::NG::Manager::new() and for this
# module
sub new {
my ( $class, $args ) = @_;
my $self = $class->SUPER::new($args);
unless ( $self->{read} ) {
print STDERR
qq#Warning, "read" parameter is not set, nothing will be displayed\n#;
}
return $self;
}
## @method hashref buildTree()
# Overload Lemonldap::NG::Manager::buildTree() to hide unwanted parts
# @return hash reference to a tree for the javascript library
sub buildTree {
my $self = shift;
my $tree = $self->SUPER::buildTree();
# Display only VirtualHosts
delete $tree->{item}->{item}->{groups};
delete $tree->{item}->{item}->{generalParameters};
my $vh = $tree->{item}->{item}->{virtualHosts}->{item};
# Display only authorized virtual hosts
foreach my $k ( keys %$vh ) {
unless ( grep { $_ eq $k } @{ $self->{read} } ) {
delete $vh->{$k};
next;
}
# and suppress write possibilities
unless ( grep { $_ eq $k } @{ $self->{write} } ) {
foreach ( @{ $vh->{$k}->{userdata} } ) {
$_->{content} = 'none' if ( $_->{name} eq 'modif' );
}
foreach my $type ( keys( %{ $vh->{$k}->{item} } ) ) {
foreach my $i ( keys( %{ $vh->{$k}->{item}->{$type}->{item} } ) ) {
foreach ( @{ $vh->{$k}->{item}->{$type}->{item}->{$i}->{userdata} } ) {
$_->{content} = 'ro' if ( $_->{name} eq 'modif' );
}
}
}
}
}
return $tree;
}
## @method boolean upload()
# Overload Lemonldap::NG::Manager::upload() to restrict upload datas to the
# authorized nodes.
sub upload {
my $self = shift;
return UPLOAD_DENIED unless ( @{ $self->{write} } );
# Convert new config
my $newConfig = $self->tree2conf(@_);
# Load current config
my $config = $self->config->getConf();
# Compare new and old config
return CONFIG_WAS_CHANGED
unless ( $config->{cfgNum} == $newConfig->{cfgNum} );
# Merge config
foreach my $vh ( @{ $self->{write} } ) {
if ( $newConfig->{locationRules}->{$vh} ) {
$config->{locationRules}->{$vh} =
$newConfig->{locationRules}->{$vh};
delete $newConfig->{locationRules}->{$vh};
}
if ( $newConfig->{exportedHeaders}->{$vh} ) {
$config->{exportedHeaders}->{$vh} =
$newConfig->{exportedHeaders}->{$vh};
delete $newConfig->{exportedHeaders}->{$vh};
}
}
# and save config
return $self->config->saveConf($config);
}
1;
__END__
=head1 NAME
Lemonldap::NG::Manager::Restricted - Restricted version of
Lemonldap::NG::Manager to show only parts of protected virtual hosts.
=head1 SYNOPSIS
use Lemonldap::NG::Manager::Restrited;
my $h=new Lemonldap::NG::Manager::Restricted (
{
configStorage=>{
type=>'File',
dirName=>"/tmp/",
},
dhtmlXTreeImageLocation=> "/devel/img/",
# uncomment this only if lemonldap-ng-manager.js is not in the same
# directory than your script.
# jsFile => /path/to/lemonldap-ng-manager.js,
read => [ 'test.example.com', 'test2.example.com' ],
write => [ 'test.example.com' ],
}
) or die "Unable to start, see Apache logs";
$h->doall();
=head1 DESCRIPTION
This module can be used to give access to a part of the Lemonldap::NG Web-SSO
configuration. You can use it to simply show or give write access to some of
the protected vortual hosts.
=head2 PARAMETERS
Lemonldap::NG::Manager::Restricted works like L<Lemonldap::NG::Manager> but
uses 2 new parameters in the constructor:
=over
=item * read : an array reference to the list of authorized virtual host to
display,
=item * write : an array reference to the list of virtual hosts that can been
updated.
=back
=head1 SEE ALSO
L<Lemonldap::NG::Manager>,
http://wiki.lemonldap.objectweb.org/xwiki/bin/view/NG/Presentation
=head1 AUTHOR
Xavier Guimard, E<lt>x.guimard@free.frE<gt>
=head1 BUG REPORT
Use OW2 system to report bug or ask for features:
L<http://forge.objectweb.org/tracker/?group_id=274>
=head1 DOWNLOAD
Lemonldap::NG is available at
L<http://forge.objectweb.org/project/showfiles.php?group_id=274>
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2007 by Xavier Guimard
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.8 or,
at your option, any later version of Perl 5 you may have available.

View File

@ -1,219 +0,0 @@
package Lemonldap::NG::Manager::SOAPServer;
use strict;
our $VERSION = '0.31';
die 'This module is now obsolete. You have to use the portal as "proxy".
See http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocSOAP';
use SOAP::Transport::HTTP;
use Lemonldap::NG::Common::Conf; #link protected config Configuration hash reference
use UNIVERSAL qw(isa);
our $VERSION = "0.3";
# Initialization
sub new {
my ( $class, @args ) = @_;
my $self;
if ( ref( $args[0] ) ) {
$self = $args[0];
}
else {
%$self = @args;
}
bless $self, $class;
# Arguments verification
if( $self->{type} eq 'sessions' ) {
unless( $self->{realSessionStorage} ) {
die qq/The "realSessionStorage" parameter is required/;
return ();
}
eval "use " . $self->{realSessionStorage};
die $@ if($@);
}
else {
unless ( $self->{configStorage} ) {
die qq/The "configStorage" parameter is required\n/;
return ();
}
$self->{config} = Lemonldap::NG::Common::Conf->new( $self->{configStorage} );
die "Configuration not loaded" unless $self->{config};
}
return $self;
}
sub init {
my $self = shift;
if( $self->{type} eq 'sessions' ) {
$Lemonldap::NG::Manager::SOAPService::Sessions::authorizedFunctions =
$self->{AuthorizedFunctions} || 'get';
$Lemonldap::NG::Manager::SOAPService::Sessions::config = $self;
}
else {
$Lemonldap::NG::Manager::SOAPService::Config::config = $self->{config};
}
}
# Main process
*process = \&start;
sub start {
my $self;
if ( ref( $_[0] ) and isa( $_[0], __PACKAGE__ ) ) {
$self = shift;
}
else {
$self = shift->new(@_);
}
$self->init();
my $service = ($self->{type} eq 'sessions')
? 'Lemonldap::NG::Manager::SOAPService::Sessions'
: 'Lemonldap::NG::Manager::SOAPService::Config';
SOAP::Transport::HTTP::CGI->dispatch_to($service)->handle;
}
# Description of SOAP service
package Lemonldap::NG::Manager::SOAPService::Config;
our $config;
sub available {
shift;
my @t = $config->available(@_);
return \@t;
}
sub lastCfg {
shift;
return $config->lastCfg(@_);
}
sub store {
shift;
return $config->store(@_);
}
sub load {
shift;
return $config->load(@_);
}
package Lemonldap::NG::Manager::SOAPService::Sessions;
our $config;
our $authorizedFunctions = 'get';
sub newsession {
unless( $authorizedFunctions =~ /\bnew\b/ ) {
print STDERR "Lemonldap::NG::Manager::SOAPService: 'new' is not authorized. Set 'AuthorizedFunctions' parameter if needed.\n";
return 0;
}
my( $class, $args ) = @_;
$args ||= {};
my %h;
eval {
tie %h, $config->{realSessionStorage}, undef, $config->{realSessionStorageOptions};
};
if ($@) {
print STDERR "Lemonldap::NG::Manager::SOAPService: $@\n";
return 0;
}
$h{$_} = $args->{$_} foreach ( keys %{ $args } );
$h{_utime} = time();
$args->{$_} = $h{$_} foreach ( keys %h );
untie %h;
return $args;
}
sub get {
return 0 unless( $authorizedFunctions =~ /\bget\b/ );
my( $class, $id ) = @_;
my %h;
eval {
tie %h, $config->{realSessionStorage}, $id, $config->{realSessionStorageOptions};
};
if ($@) {
print STDERR "Lemonldap::NG::Manager::SOAPService: $@\n";
return 0;
}
my $args;
$args->{$_} = $h{$_} foreach ( keys %h );
untie %h;
return $args;
}
sub set {
return 0 unless( $authorizedFunctions =~ /\bset\b/ );
my( $class, $id, $args ) = @_;
my %h;
eval {
tie %h, $config->{realSessionStorage}, $id, $config->{realSessionStorageOptions};
};
if ($@) {
print STDERR "Lemonldap::NG::Manager::SOAPService: $@\n";
return 0;
}
$h{$_} = $args->{$_} foreach ( keys %{ $args } );
untie %h;
return $args;
}
sub delete {
return 0 unless( $authorizedFunctions =~ /\bdelete\b/ );
my( $class, $id ) = @_;
my %h;
eval {
tie %h, $config->{realSessionStorage}, $id, $config->{realSessionStorageOptions};
};
if ($@) {
print STDERR "Lemonldap::NG::Manager::SOAPService: $@\n";
return 0;
}
tied(%h)->delete;
}
1;
__END__
=head1 NAME
Lemonldap::NG::Manager::SOAPServer - Obsolete : now SOAP services are included
in the Lemonldap::NG portal.
=head1 SYNOPSIS
=head1 DESCRIPTION
This module is obsolete. Now, use the portal.
=head1 SEE ALSO
L<Lemonldap::NG::Portal>,
=head1 AUTHOR
Xavier Guimard, E<lt>x.guimard@free.frE<gt>
=head1 BUG REPORT
Use OW2 system to report bug or ask for features:
L<http://forge.objectweb.org/tracker/?group_id=274>
=head1 DOWNLOAD
Lemonldap::NG is available at
L<http://forge.objectweb.org/project/showfiles.php?group_id=274>
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2007 by Xavier Guimard
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.8 or,
at your option, any later version of Perl 5 you may have available.
=cut

View File

@ -0,0 +1,260 @@
package Lemonldap::NG::Manager::Uploader;
use strict;
use XML::LibXML;
use XML::LibXSLT;
use MIME::Base64;
# TODO
use Data::Dumper;
use Lemonldap::NG::Common::Safelib; #link protected safe Safe object
use Lemonldap::NG::Manager::Downloader;
use Lemonldap::NG::Manager::_Struct;
our $VERSION = '0.1';
our ( $stylesheet, $parser );
sub confUpload {
my ( $self, $rdata ) = @_;
$$rdata =~ s/<img.*?>//g;
$$rdata =~ s/<li class="line".*?<\/li>//g;
# Apply XSLT stylesheet to returned datas
my $result =
$self->stylesheet->transform(
$self->parser->parse_string( '<root>' . $$rdata . '</root>' ) )
->documentElement();
# Get configuration number
unless ( $self->{cfgNum} =
$result->getChildrenByTagName('conf')->[0]->getAttribute('value') )
{
die "No configuration number found";
}
my $newConf = { cfgNum => $self->{cfgNum} };
# Loading returned parameters
my $res;
foreach ( @{ $result->getChildrenByTagName('element') } ) {
my ( $id, $name, $value ) = (
$_->getAttribute('id'),
$_->getAttribute('name'),
$_->getAttribute('value')
);
my $NK = 0;
$id =~
s/^text_(NewID_)?li_(\w+)(\d)(?:_\d+)?$/decode_base64($2.'='x $3)/e;
$NK = 1 if ($1);
$id =~ s/^\///;
print STDERR "################ $id\n" if ($NK);
$id =~ s/(?:\/[^\/]*)?$/\/$name/ if ($NK);
print STDERR "################ $id\n" if ($NK);
next if ( $id =~ /^(generalParameters|virtualHosts)/ );
my ( $confKey, $test ) = $self->getConfTests($id);
my ( $res, $m );
if ( !defined($test) ) {
$res->{errors}->{$name} =
"Key $name: Lemonldap::NG::Manager error, see Apache's logs";
$self->lmLog(
"Unknown configuration key $id (name: $name, value: $value)",
'error' );
next;
}
if ( $test->{'*'} and $id =~ /\// ) { $test = $test->{'*'} }
# Tests (no test for hash root nodes)
unless ( $test->{keyTest} and ( $id !~ /\// or $test->{'*'} ) ) {
if ( $test->{keyTest} ) {
( $res, $m ) = $self->applyTest( $test->{keyTest}, $name );
unless ($res) {
$res->{errors}->{$name} = "Value \"$name\" rejected: "
. ( $m || $test->{keyMsgFail} );
next;
}
}
if ( $test->{test} ) {
( $res, $m ) = $self->applyTest( $test->{test}, $value );
unless ($res) {
$res->{errors}->{$name} =
"Value of key \"$name\" rejected: "
. ( $m || $test->{msgFail} );
next;
}
}
if ( $test->{warnKeyTest} ) {
( $res, $m ) = $self->applyTest( $test->{warnKeyTest}, $name );
unless ($res) {
$res->{warnings}->{$name} = "Warning for value \"$name\": "
. ( $m || $test->{keyMsgWarn} );
}
}
if ( $test->{warnTest} ) {
( $res, $m ) = $self->applyTest( $test->{warnTest}, $value );
unless ($res) {
$res->{warnings}->{$name} =
"Warning for the value of key \"$name\": "
. ( $m || $test->{keyMsgWarn} );
}
}
}
print STDERR
"$confKey, $test->{keyTest}, $id, $test->{'*'}, $name => $value\n"
if ($NK);
print STDERR ( ( $id !~ /\// or $test->{'*'} ) ? "a\n" : "b\n" )
if ($NK);
$self->setKeyToH( $newConf, $confKey,
$test->{keyTest}
? ( ( $id !~ /\// or $test->{'*'} ) ? {} : ( $name => $value ) )
: $value );
}
# Loading unchanged parameters (ajax nodes not open)
foreach ( @{ $result->getChildrenByTagName('ignore') } ) {
my $node = $_->getAttribute('value');
$node =~ s/^.*node=(.*?)(?:&.*)?\}$/$1/;
foreach my $k ( $self->findAllConfKeys( $self->corresp($node) ) ) {
my $v = $self->keyToH( $k, $self->conf );
$v = $self->keyToH( $k, $self->defaultConf ) unless ( defined $v );
if ( defined $v ) {
$self->setKeyToH( $newConf, $k, $v );
}
else {
$self->lmLog( "No default value found for $k", 'warn' );
}
}
print LOG "Ignore $node\n";
}
#print STDERR Dumper( $newConf, \%errors, \%warnings );
close LOG;
my $buf = '{';
my $i=0;
while ( my ( $type, $h ) = each %$res ) {
$buf .= ',' if($i);
$buf .= "$type:{";
$buf .= join( ',', map { "$_:$h->{$_}" } keys %$h );
$buf .= '}';
$i++;
}
$buf .= '}';
print $self->header( -type => 'text/javascript', -Content_Length => length($buf) ).$buf;
$self->quit();
}
sub applyTest {
my ( $self, $test, $value ) = @_;
my ( $res, $msg );
if ( ref($test) eq 'CODE' ) {
( $res, $msg ) = &$test($value);
}
else {
$res = ( $value =~ $test ? 1 : 0 );
}
return ( $res, $msg );
}
sub getConfTests {
my ( $self, $id ) = @_;
my ( $confKey, $tmp ) = ( $id =~ /^(.*?)(?:\/(.*))?$/ );
my $h = $self->testStruct()->{$confKey};
if ( $h and $h->{'*'} and my ( $k, $v ) = ( $tmp =~ /^(.*?)\/(.*)$/ ) ) {
return ( "$confKey/$k", $h->{'*'} );
}
return ( $confKey, $h );
}
sub findAllConfKeys {
my ( $self, $h ) = @_;
my @res = ();
foreach my $n ( @{ $h->{_nodes} } ) {
$n =~ s/^.*?:(.*?)(?:\:.*)?$/$1/;
if ( ref( $h->{$n} ) ) {
push @res, $self->findAllConfKeys( $h->{$n} );
}
else {
my $m = $h->{$n} || $n;
push @res, ( $m =~ /^(?:.*?:)?(.*?)(?:\:.*)?$/ ? $1 : () );
}
}
return @res;
}
sub setKeyToH {
my $value = pop;
my ( $self, $h, $key, $k2 ) = @_;
my $tmp = $h;
$key =~ s/^\///;
while (1) {
if ( $key =~ /\// ) {
my $k = $`;
$key = $';
$tmp = $tmp->{$k} ||= {};
}
else {
if ($k2) {
$tmp->{$key} = {} unless ( ref( $tmp->{$key} ) );
$tmp->{$key}->{$k2} = $value;
}
else {
$tmp->{$key} = $value;
}
last;
}
}
}
sub parser {
my $self = shift;
return $parser if ($parser);
$parser = XML::LibXML->new();
}
sub stylesheet {
my $self = shift;
return $stylesheet if ($stylesheet);
my $xslt = XML::LibXSLT->new();
my $style_doc = $self->parser->parse_string( join( '', <DATA> ) );
close DATA;
$stylesheet = $xslt->parse_stylesheet($style_doc);
}
1;
__DATA__
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"
encoding="UTF-8"/>
<xsl:template match="/">
<root>
<xsl:apply-templates/>
</root>
</xsl:template>
<xsl:template match="li">
<xsl:choose>
<xsl:when test="starts-with(.,'.')">
<ignore><xsl:attribute name="value"><xsl:value-of select="."/></xsl:attribute></ignore>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="span">
<xsl:choose>
<xsl:when test="@id='text_li_cm9vdA2'">
<conf><xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute></conf>
</xsl:when>
<xsl:otherwise>
<element>
<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
<xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute>
</element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>

View File

@ -1,502 +0,0 @@
## @file
# Display HTML parts of Lemonldap::NG::Manager
## @class
# Display HTML parts of Lemonldap::NG::Manager
package Lemonldap::NG::Manager::_HTML;
# This package contains all subroutines that are provided after a
# 'header_public' call. So those functions are called only if the browser
# comes for the first time.
use AutoLoader qw(AUTOLOAD);
require Lemonldap::NG::Manager::_i18n; #inherits
use Lemonldap::NG::Common::Conf::Constants; #inherits
our $VERSION = '0.32';
# TODO: Delete buttons in headers and rules if 'read-only'
# TODO: Display errors in saveConf
1;
__END__
=pod
=cut
## @method void css()
# Display Lemonldap::NG::Manager CSS file.
sub css {
print <<EOT;
/* xSplitter Styles */
.clsSplitter
{
position: absolute;
overflow: hidden;
visibility: hidden;
margin: 0;
padding: 0;
background: #FFF;
border: none;
}
.clsPane
{
position: absolute;
overflow: auto;
visibility: visible;
margin: 0;
padding: 0;
background: #FFF;
border: none;
}
.clsDragBar
{
position: absolute;
overflow: hidden;
visibility: visible;
margin: 0;
padding: 0;
background: lightgrey;
border: none;
}
/* Application Styles */
#xBody { overflow: visible; background-color: #FFF; }
.clsTemporaryContainer /* replace this with something like xFenster */
{
position: relative;
overflow: visible;
visibility: visible;
background: transparent;
border: none;
}
#idSplitter3 { border: 4px solid lightgrey; }
h3, p { padding: 0 0 0 6px; border: none; }
#buttons { text-align: center; }
#help { text-align: left; }
EOT
}
## @method void javascript()
# Display Lemonldap::NG::Manager javascript file.
sub javascript {
my $self = shift;
Lemonldap::NG::Manager::_i18n::import( $self->{language} || $ENV{HTTP_ACCEPT_LANGUAGE} )
unless ( __PACKAGE__->can('txt_newVirtualHost') );
my %text;
foreach (
qw(newVirtualHost newMacro newGroup newVar newGSOpt saveConf
deleteNode locationRules unableToSave confSaved saveFailure
newRule newHeader httpHeaders waitingResult unknownError
configurationWasChanged configLoaded warningConfNotApplied
applyConf prevConf lastConf nextConf deleteVirtualHost
areYouSure syntaxError deleteConf confirmDeleteConf
invalidVirtualHostName)
)
{
$text{$_} = &{"txt_$_"};
$text{$_} =~ s/'/\\'/g;
}
print qq#
function loadConf(n) {
document.body.style.cursor='wait';
document.getElementById('treeBox').innerHTML='';
tree=new dhtmlXTreeObject(document.getElementById('treeBox'),"100%","100%",0);
tree.setImagePath("$self->{dhtmlXTreeImageLocation}");
tree.setXMLAutoLoading("$ENV{SCRIPT_NAME}?lmQuery=conf");
tree.loadXML("$ENV{SCRIPT_NAME}?lmQuery=conf&cfgNum="+n);
tree.setOnClickHandler(onNodeSelect);
tree.selectItem('virtualHosts',true,false);
document.getElementById('help').innerHTML='<h3>$text{configLoaded}</h3>';
window.setTimeout("document.body.style.cursor='auto'",1000);
}
var s3,s32;
window.onload=function(){
var w=X.clientWidth()-12;
var h=X.clientHeight()-12;
//var h=window.outerHeight;
s32=new xSplitter('idSplitter32',0,0,0,0,false,4,h/2,h/8,true,0);
s3=new xSplitter('idSplitter3',0,0,w,h,true,4,w/4,w/8,true,4,null,s32);
X.addEventListener(window,'resize',win_onresize,false);
document.getElementById('help').innerHTML='<h3>$text{waitingResult}</h3>';
loadConf(0);
};
function win_onresize(){
var cw=X.clientWidth();
var w=X.clientWidth()-12;
var h=X.clientHeight()-12;
s3.paint(w,h,w/4,w/5);
}
var indice=1;
function onNodeSelect(nodeId) {
var k,v;
if(tree.getUserData(nodeId,"modif")) {
switch(tree.getUserData(nodeId,"modif")) {
case 'text':
k='valeur';
v='<input size="$self->{inputSize}" value="'+tree.getItemText(nodeId)+'" onChange="tree.setItemText('+"'"+nodeId+"'"+',this.value);">';
break;
case 'both':
k='<input size="$self->{inputSize}" value="'+tree.getItemText(nodeId)+'" onChange="tree.setItemText('+"'"+nodeId+"'"+',this.value)">';
v='<textarea cols="$self->{textareaW}" rows="$self->{textareaH}" onChange="tree.setUserData('+"'"+nodeId+"'"+','+"'"+'value'+"'"+',this.value)">'+tree.getUserData(nodeId,'value')+'</textarea>';
break;
case 'value':
k=tree.getItemText(nodeId);
v='<textarea cols="$self->{textareaW}" rows="$self->{textareaH}" onChange="tree.setUserData('+"'"+nodeId+"'"+','+"'"+'value'+"'"+',this.value)">'+tree.getUserData(nodeId,'value')+'</textarea>';
break;
case 'ro':
k=tree.getItemText(nodeId);
v='<p>'+tree.getUserData(nodeId,'value')+'</p>';
break;
case 'none':
k=tree.getItemText(nodeId);
v='<p>&nbsp;</p>';
break;
}
document.getElementById('formulaire').style.display='block';
document.getElementById('name').innerHTML = k;
document.getElementById('value').innerHTML = v;
}
else {
document.getElementById('formulaire').style.display='none';
}
var but='';
if(nodeIs(nodeId,"virtualHosts") && tree.getUserData(nodeId,"modif") != "none" && tree.getUserData(nodeId,"modif") != 'ro' ){
but+=button('$text{newVirtualHost}','newVirtualHost',nodeId);
if(nodeIs(nodeId,"virtualHost")){
but+=button('$text{deleteVirtualHost}','deleteVirtualHost',nodeId);
but+=button('$text{newRule}','newRule',nodeId);
but+=button('$text{newHeader}','newHeader',nodeId);
}
help('virtualHosts');
}
else if(nodeIs(nodeId,"macros")){
but+=button('$text{newMacro}','newMacro',nodeId);
help('macros');
}
else if(nodeIs(nodeId,"groups")){
but+=button('$text{newGroup}','newGroup',nodeId);
help('groups');
}
else if(nodeIs(nodeId,"whatToTrace")){
help('whatToTrace');
}
else if(nodeIs(nodeId,"generalParameters")){
if(nodeIs(nodeId,"ldapParameters")){
help('ldap');
}
else if(nodeIs(nodeId,"exportedVars")){
but+=button('$text{newVar}','newVar',nodeId);
help('vars');
}
else if(nodeIs(nodeId,'sessionStorage')){
if(nodeIs(nodeId,"globalStorageOptions")){
but+=button('$text{newGSOpt}','newGSOpt',nodeId);
}
help('storage');
}
else if(nodeIs(nodeId,'authParams')){
help('authParams');
}
else if(nodeIs(nodeId,'cookieName')){
help('cookieName');
}
else if(nodeIs(nodeId,'timeout')){
help('timeout');
}
else if(nodeIs(nodeId,'domain')){
help('domain');
}
}
if(tree.getUserData(nodeId,"modif")=='both') but+=button('$text{deleteNode}','deleteNode',nodeId);
but+=button('$text{saveConf}','saveConf',nodeId);
if(nodeId == 'root') but+=button('$text{prevConf}','prevConf',nodeId)
+button('$text{nextConf}','nextConf',nodeId)
+button('$text{lastConf}','lastConf',nodeId)
+button('$text{deleteConf}','deleteConf',nodeId);
#;
print "but+=button('$text{applyConf}','applyConf',nodeId);";
print qq#
document.getElementById('buttons').innerHTML = but;
}
function nodeIs(id,type) {
if(id==type)return 1;
if(id=="root")return 0;
var next=tree.getParentId(id);
if(type=="virtualHost" && next=="virtualHosts")return 1;
return nodeIs(next,type);
}
function vhostId(id){
var next=tree.getParentId(id);
if(next=="virtualHosts") return id;
return vhostId(next);
}
function button(text,func,nodeId){
return '<input type=button value="'+text+'" onclick="'+func+'('+"'"+nodeId+"'"+')"> &nbsp; ';
}
function insertNewChild(a,c) {
indice++;
tree.insertNewChild(a,'js_'+indice,c);
tree.setItemColor('js_'+indice,"\#000000","\#0000FF");
return 'js_'+indice;
}
function newVirtualHost() {
var rep=prompt("$text{newVirtualHost}");
if(rep) {
if(!rep.match(/^\\w[\\w\\.\\-]*\\w\$/)){
alert('$text{invalidVirtualHostName}');
return 0;
}
var tmp=insertNewChild('virtualHosts',rep)
tree.setUserData(tmp,'modif','text');
//var tmp_eh=insertNewChild(tmp,'$text{httpHeaders}');
var tmp_eh=tmp+'_exportedHeaders';
tree.insertNewChild(tmp,tmp_eh,'$text{httpHeaders}');
tree.setItemColor(tmp_eh,"\#000000","\#0000FF");
var tmp_eh1=insertNewChild(tmp_eh,'Auth-User');
tree.setUserData(tmp_eh1,'modif','both');
tree.setUserData(tmp_eh1,'value','\$uid');
var tmp_lr=tmp+'_locationRules';
tree.insertNewChild(tmp,tmp_lr,'$text{locationRules}');
tree.setItemColor(tmp_lr,"\#000000","\#0000FF");
var tmp_lr1=insertNewChild(tmp_lr,'default');
tree.setUserData(tmp_lr1,'modif','value');
tree.setUserData(tmp_lr1,'value','deny');
}
}
function deleteVirtualHost(id) {
var vh=vhostId(id);
if(confirm('$text{areYouSure}')) tree.deleteItem(vh);
}
function newValue(id,text,type,value){
var tmp=insertNewChild(id,text);
tree.setUserData(tmp,'modif',type);
tree.setUserData(tmp,'value',value);
tree.selectItem(tmp,true);
}
function newRule(id){
var lr=tree.getItemIdByIndex(vhostId(id),1);
newValue(lr,'^/New/rule','both','deny');
}
function newHeader(id){
var eh=tree.getItemIdByIndex(vhostId(id),0);
newValue(eh,'New-Header','both','\$uid');
}
function newGroup(id){
newValue('groups','NewGroup','both','');
}
function newMacro(id){
newValue('macros','NewMacro','both','');
}
function newVar(id){
newValue('exportedVars','NewVar','both','uid');
}
function newGSOpt(id){
newValue('globalStorageOptions','NewOpt','both','');
}
function deleteNode(id){
tree.deleteItem(id);
}
var xhr_object = null;
if(window.XMLHttpRequest) // Firefox
xhr_object = new XMLHttpRequest();
else if(window.ActiveXObject) // Internet Explorer
xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
else { // XMLHttpRequest non supporté par le navigateur
alert('$text{unableToSave}');
}
function help(s){
xhr_object.open("GET", "$ENV{SCRIPT_NAME}?lmQuery=help&help="+s, true);
xhr_object.onreadystatechange = function() {
if(xhr_object.readyState == 4) document.getElementById('help').innerHTML=xhr_object.responseText;
}
xhr_object.send(null);
}
function saveConf(){
var h=tree2txt('root');
xhr_object.open("POST", "$ENV{SCRIPT_NAME}?lmQuery=upload",true);
xhr_object.setRequestHeader("Content-type", "text/xml");
xhr_object.setRequestHeader("Content-length", h.length);
xhr_object.onreadystatechange = function() {
if(xhr_object.readyState == 4){
window.setTimeout(xhr_object.responseText,0);
}
else document.getElementById('help').innerHTML='<h3>$text{waitingResult}</h3>';
}
xhr_object.send(h);
}
function tree2txt(id){
var s=tree.getSubItems(id);
var c;
id = id.replace(/^[0-9]*_/,'');
var r='<'+id+"><text>"+ec(tree.getItemText(id))+"</text>\\n";
if((!s) || s==''){
r+= '<value>'+ec(tree.getUserData(id,'value'))+"</value>\\n";
}
else {
c=s.split(',');
for(var i=0;i<c.length;i++){
r+=tree2txt(c[i]);
}
}
r+="</"+id+">\\n";
return r;
}
function applyConf(){
xhr_object.open('GET', "$ENV{SCRIPT_NAME}?lmQuery=apply",true);
xhr_object.onreadystatechange = function() {
if(xhr_object.readyState == 4) document.getElementById('help').innerHTML=xhr_object.responseText;
}
xhr_object.send(null);
}
var previous = 0;
function prevConf(){
previous--;
loadConf(previous);
}
function nextConf(){
if(previous<0){
previous++;
loadConf(previous);
}
}
function lastConf(){
previous=0;
loadConf(0);
}
function deleteConf(){
if(!(confirm('$text{confirmDeleteConf}'))) return 0;
previous=0;
xhr_object.open('GET', "$ENV{SCRIPT_NAME}?lmQuery=delete&cfgNum="+previous,true);
xhr_object.onreadystatechange = function() {
if(xhr_object.readyState == 4){
document.getElementById('help').innerHTML=xhr_object.responseText;
loadConf(0);
}
}
xhr_object.send(null);
}
function ec(s){
if((!s) || s=='') return s;
return s.replace(/>/g,'&gt;').replace(/</g,'&lt;');
}
#;
}
## @method void start_html()
# Overload CGI::start_html to add HTML links to javascript and css files.
sub start_html {
my $self = shift;
my %args = @_;
$args{'-style'} = { -src => [ $args{'-style'} ] }
if ( $args{'-style'} and !ref( $args{'-style'} ) );
unshift @{ $args{'-style'}->{'-src'} }, "$ENV{SCRIPT_NAME}?lmQuery=css";
$args{'-title'} ||= 'Lemonldap::NG Configuration';
$args{'-encoding'} ||= 'utf8';
$self->CGI::start_html(%args);
}
## @method void main()
# Display main HTML code.
sub main {
my $self = shift;
Lemonldap::NG::Manager::_i18n::import( $self->{language} || $ENV{HTTP_ACCEPT_LANGUAGE} )
unless ( __PACKAGE__->can('txt_field') );
my %text;
foreach (qw(field value)) {
$text{$_} = &{"txt_$_"};
$text{$_} =~ s/'/\\'/g;
}
# Lemonldap::Manager javascripts;
print
qq#<script type="text/javascript" src="$ENV{SCRIPT_NAME}?lmQuery=libjs"></script>\n#;
print
qq#<script type="text/javascript" src="$ENV{SCRIPT_NAME}?lmQuery=lmjs"></script>\n#;
# HTML code
print <<EOT;
<div id='xBody'>
<div class="clsTemporaryContainer">
<div style="visibility: visible;" id="idSplitter3" class="clsSplitter">
<div style="z-index: 2;" id="gauche" class="clsPane">
<div id="treeBox" style="width:200;height:200"></div>
</div><!-- end Pane -->
<div style="overflow: hidden; z-index: 2;" id="droit" class="clsPane">
<div style="visibility: visible;" id="idSplitter32" class="clsSplitter">
<div style="z-index: 2;" id="haut" class="clsPane">
<div id="buttons"></div>
<div id="formulaire" style="display:none;">
<form onsubmit="return false" action="$ENV{SCRIPT_NAME}">
<p></p>
<table border="1" width="100%" style="empty-cells:show;">
<tr>
<th width="200">$text{field}</th>
<th width="400">$text{value}</th>
</tr>
<tr>
<td>
<div id="name">&nbsp;</div>
</td>
<td>
<div id="value">&nbsp;</div>
</td>
</tr>
</table>
</form>
</div>
</div><!-- end Pane -->
<div style="z-index: 2;" id="bas" class="clsPane">
<div id="help"></div>
</div><!-- end Pane -->
<div style="z-index: 1; cursor: n-resize;" id="barre2" class="clsDragBar">
&nbsp;
</div>
</div><!-- end Splitter -->
</div><!-- end Pane -->
<div style="z-index: 1; cursor: e-resize;" class="clsDragBar">
&nbsp;
</div>
</div><!-- end Splitter -->
</div><!-- end TemporaryContainer -->
</div>
EOT
}

View File

@ -1,94 +0,0 @@
## @file
# Prepare Lemonldap::NG::Manager response for new configurations
## @class
# Prepare Lemonldap::NG::Manager response for new configurations
package Lemonldap::NG::Manager::_Response;
our $VERSION = '0.11';
## @cmethod Lemonldap::NG::Manager::_Response new()
# Constructor
# @return Lemonldap::NG::Manager::_Response object
sub new {
my $class = shift;
return bless { errors => [], warnings => [] }, $class;
}
## @method void print(array p)
# Join all stings in @p into $self->{txt}
sub print {
my $self = shift;
$self->{txt} .= $_ foreach(@_);
}
## @method void message(string title,string txt)
# Build HTML part to display.
# @param $title title of the message
# @param $txt text of the message
sub message {
my $self = shift;
my ($title, $txt) = @_;
$self->{txt} = "<h3>$title</h3><p>$txt</p>" . $self->{txt};
}
## @method private void warning(array warnings)
# Store warnings in $self->{warnings}
# @param @warnings array of string
sub warning {
my $self = shift;
push @{$self->{warnings}}, @_;
}
## @method private void error(array errors)
# Store warnings in $self->{errors}
# @param @errors array of string
sub error {
my $self = shift;
return scalar @{$self->{errors}} unless(@_);
push @{$self->{errors}}, @_;
}
## @method protected void setConfiguration(hashref configuration)
# Store $configuration in $self->{configuration}
# @param $configuration Lemonldap::NG configuration
sub setConfiguration {
my $self = shift;
$self->{configuration} = shift;
}
## @method void send()
# Display upload response.
sub send {
my $self = shift;
my $buf;
$buf = "tree.setItemText('root','Configuration $self->{configuration}');"
if($self->{configuration});
if ( $self->error ) {
$self->{txt} .= "<h4>Errors</h4><ul>";
foreach ( @{$self->{errors}} ) {
s/</&lt;/g;
s/>/&gt;/g;
$self->{txt} .= "<li>$_</li>"
}
$self->{txt} .= "</ul>";
}
if ( $self->warning ) {
$self->{txt} .= "<h4>Warnings</h4><ul>";
foreach ( @{$self->{warnings}} ) {
s/</&lt;/g;
s/>/&gt;/g;
$self->{txt} .= "<li>$_</li>"
}
$self->{txt} .= "</ul>";
}
if($self->{txt}) {
$self->{txt} =~ s/'/\\'/g;
$self->{txt} =~ s/[\r\n]//g;
$buf .= "document.getElementById('help').innerHTML='$self->{txt}';";
}
print $buf;
}
1;
__END__

View File

@ -0,0 +1,255 @@
package Lemonldap::NG::Manager::_Struct;
use strict;
our $VERSION = '0.1';
sub cstruct {
shift;
my ( $h, $k ) = @_;
%$h = (
%$h,
virtualHosts => {
$k => {
_nodes => [qw(rules:rules:rules headers)],
rules => {
_nodes => ["hash:/locationRules/$k:rules:rules"],
_js => 'rulesRoot'
},
headers =>
{ _nodes => ["hash:/exportedHeaders/$k"], _js => 'hashRoot' },
}
}
);
return $h;
}
sub struct {
return {
_nodes => [qw(n:generalParameters n:groups n:virtualHosts)],
_help => 'default',
generalParameters => {
_nodes => [
qw(n:authParams cookieParams cn:exportedVars cn:macros sessionParams ldapParams)
],
_help => 'default',
authParams => {
_nodes => [qw(portal authentication userDB whatToTrace)],
_help => 'authParams',
authentication => 'text:/authentication',
portal => 'text:/portal',
userDB => 'text:/userDB',
whatToTrace => 'text:/whatToTrace:whatToTrace:text',
},
cookieParams => {
_nodes => [qw(cookieName domain securedCookie)],
cookieName => 'text:/cookieName:cookieName:text',
domain => 'text:/domain:domain:text',
securedCookie =>
'int:/securedCookie:securedCookie:securedCookieValues',
},
exportedVars => {
_nodes => ['hash:/exportedVars:vars:btext'],
_js => 'hashRoot'
},
macros =>
{ _nodes => ['hash:/macros:macros:btext'], _js => 'hashRoot' },
sessionParams => {
_nodes => [qw(sessionStorage timeout)],
_help => 'storage',
sessionStorage => {
_nodes => [qw(globalStorage globalStorageOptions)],
globalStorage => 'text:/globalStorage',
globalStorageOptions => {
_nodes => ['hash:/globalStorageOptions'],
_js => 'hashRoot'
},
},
timeout => 'text:/timeout:timeout:text',
},
ldapParams => {
_nodes =>
[qw(ldapServer ldapPort ldapBase managerDn managerPassword)],
_help => 'ldap',
ldapServer => 'text:/ldapServer',
ldapPort => 'int:/ldapPort',
ldapBase => 'text:/ldapBase',
managerDn => 'text:/managerDn',
managerPassword => 'text:/managerPassword',
},
},
groups => { _nodes => ['hash:/groups:groups:btext'], _js => 'hashRoot' },
virtualHosts =>
{ _nodes => ['nhash:/locationRules:virtualHosts:none'], },
};
}
sub testStruct {
my $assignTest = qr/(?<=[^=<!>\?])=(?![=~])/;
my $assignMsg = 'containsAnAssignment';
my $perlExpr = sub {
my $e = shift;
eval "use strict;$e";
return 1 if ( $@ =~ /Global symbol "\$.*requires explicit package/ );
return ( $@ ? ( 0, $@ ) : 1 );
};
return {
authentication => {
test => qr/^[a-zA-Z][\w\:]*$/,
msgFail => 'Bad module name',
},
userDB => {
test => qr/^[a-zA-Z][\w\:]*$/,
msgFail => 'Bad module name',
},
whatToTrace => {
test => qr/^\$?[a-zA-Z]\w*$/,
msgFail => 'Bad value',
},
portal => {
test => qr/^https?:\/\/\S+$/,
msgFail => 'Bad portal value',
},
cookieName => {
test => qr/^[a-zA-Z]\w*$/,
msgFail => 'Bad cookie name',
},
securedCookie => {
test => qr/^(?:0|1|2)$/,
msgFail => 'securedCookie must be 0, 1 or 2',
},
domain => {
test => qr/^\.?\w+(?:\.[a-zA-Z]\w*)*(?:\.[a-zA-Z]+)$/,
msgFail => 'Bad domain',
},
timeout => {
test => qr/^\d*$/,
msgFail => 'Bad number'
},
globalStorage => {
test => qr/^[\w:]+$/,
msgFail => 'Bad module name',
},
globalStorageOptions => {
keyTest => qr/^\w+$/,
keyMsgFail => 'Bad parameter',
},
ldapBase => {
test => qr/^(?:\w+=.*|)$/,
msgFail => 'Bad LDAP base',
},
ldapPort => {
test => qr/^\d*$/,
msgFail => 'Bad port number'
},
ldapServer => {
test => sub {
my $l = shift;
my @s = split( /[\s,]+/, $l );
foreach my $s (@s) {
$s =~
/^(?:ldap(?:s|\+tls|i):\/\/)?\w[\w\-\.]+\w(?::\d{0,5})?\/?$/
or return ( 0, "Bad ldap uri \"$s\"" );
}
return 1;
},
},
managerDn => {
test => qr/^(?:\w+=.*,\w+=.*)?$/,
msgFail => 'Bad LDAP dn',
},
managerPassword => {},
groups => {
keyTest => qr/^\w[\w-]*$/,
keyMsgFail => 'Bad group name',
test => $perlExpr,
warnTest => sub {
my $e = shift;
return ( 0, $assignMsg ) if ( $e =~ $assignTest );
1;
},
},
exportedVars => {
keyTest => qr/^[a-zA-Z]\w*$/,
keyMsgFail => 'Bad variable name',
test => qr/^[a-zA-Z]\w*$/,
msgFail => 'Bad attribute name',
},
macros => {
keyTest => qr/^[a-zA-Z]\w*$/,
keyMsgFail => 'Bad macro name',
test => $perlExpr,
warnTest => sub {
my $e = shift;
return ( 0, $assignMsg ) if ( $e =~ $assignTest );
1;
},
},
locationRules => {
keyTest => qr/^[a-zA-Z](?:[\w\-\.]*\w)?$/,
msgFail => 'Bad virtual host name',
'*' => {
keyTest => sub {
my $r = shift;
my $q;
eval { $q = qr/$r/ };
return ( $@ ? ( 0, $@ ) : 1 );
},
test => sub {
my $e = shift;
return 1 if ( $e eq 'accept' or $e eq 'deny' );
if ( $e =~ s/^logout(?:_(?:app|sso|app_sso))?\s*// ) {
return (
$e =~ /^(?:https?:\/\/\S+)?$/
? 1
: ( 0, "bad url \"$e\"" )
);
}
return &$perlExpr($e);
},
warnTest => sub {
my $e = shift;
return ( 0, $assignMsg )
if ( $e =~ $assignTest
and $e !~ /^(?:accept|deny|logout)/ );
1;
},
},
},
exportedHeaders => {
keyTest => qr/^[a-zA-Z](?:[\w\-\.]*\w)?$/,
msgFail => 'Bad virtual host name',
'*' => {
keyTest => qr/^\w([\w\-]*\w)?$/,
keyMsgFail => 'Bad header name',
test => $perlExpr,
warnTest => sub {
my $e = shift;
return ( 0, $assignMsg ) if ( $e =~ $assignTest );
1;
},
},
},
};
}
sub defaultConf {
return {
userDB => 'LDAP',
ldapServer => 'localhost',
};
}
sub newNode {
virtualHost => {
'*' => {
exportedHeaders => { 'Auth-User' => '$uid' },
locationRules => { 'default' => 'deny' },
}
},
groups => { 'NewGroup' => '0', },
macro => { 'NewMacro' => '', },
globalStorageOptions => { 'NewOption' => '', },
;
}
1;

View File

@ -7,27 +7,32 @@ package Lemonldap::NG::Manager::_i18n;
# Developer warning : this file must be utf8 encoded
use strict;
use AutoLoader qw(AUTOLOAD);
our $VERSION = '0.34';
our $VERSION = '0.5';
## @fn void import(string lang)
# Import messages
sub import {
my ($caller_package) = caller;
my $lang = pop;
sub translate {
my ( $self, $text, $lang ) = @_;
return $text unless ( $text =~ /[a-z]/ );
$lang ||= $ENV{HTTP_ACCEPT_LANGUAGE};
$lang = lc($lang);
$lang =~ s/-/_/g;
foreach ( split( /[,;]/, $lang ) ) {
foreach ( split( /[,;]/, $lang ), 'en' ) {
next if /=/;
if ( __PACKAGE__->can($_) ) {
$functions = &$_;
last;
no strict 'refs';
my $r = &$_()->{$text};
if ($r) {
return $r;
}
else {
print STDERR __PACKAGE__ . ": $text not translated in $_\n";
return $text;
}
}
}
$functions ||= &en;
while ( my ( $f, $v ) = each(%$functions) ) {
*{"${caller_package}::txt_$f"} = sub { $v };
}
}
*fr_fr = *fr;
@ -35,6 +40,72 @@ sub import {
1;
sub en {
return {
authentication => 'Authentication module',
authParams => 'Authentication parameters',
Configuration => 'Configuration',
cookieName => 'Cookie Name',
cookieParams => 'Cookies Parameters',
domain => 'Domain',
exportedVars => 'Exported Variables',
generalParameters => 'General Parameters',
globalStorage => 'Apache::Session module',
globalStorageOptions => 'Apache::Session module parameters',
groups => 'Groups',
headers => 'HTTP Headers',
ldapBase => 'LDAP Search Base',
ldapParams => 'LDAP parameters',
ldapPort => 'LDAP Server Port',
ldapServer => 'LDAP Server',
macros => 'Macros',
managerDn => 'LDAP Account',
managerPassword => 'LDAP Password',
portal => 'Portal',
rules => 'Rules',
securedCookie => 'Secured Cookie (SSL)',
sessionParams => 'Sessions Parameters',
sessionStorage => 'Sessions Storage',
timeout => 'Sessions timeout',
userDB => 'Users database type',
virtualHosts => 'Virtual Hosts',
whatToTrace => "Attribute to use in Apache's logs",
};
}
sub fr {
return {
authentication => "Module d'authentification",
authParams => "Paramètres d'authentification",
Configuration => 'Configuration',
cookieName => 'Nom du cookie',
cookieParams => 'Paramètres des cookies',
domain => 'Domaine',
exportedVars => 'Attributs LDAP à exporter',
generalParameters => 'Paramètres généraux',
globalStorage => 'Module Apache::Session',
globalStorageOptions => 'Paramètres du module Apache::Session',
groups => 'Groupes',
headers => 'En-têtes HTTP',
ldapBase => 'Base de recherche LDAP',
ldapParams => 'Paramètres LDAP',
ldapPort => 'Port du serveur LDAP',
ldapServer => 'Serveur LDAP',
macros => 'Macros',
managerDn => 'Compte de connexion LDAP',
managerPassword => 'Mot de passe LDAP',
portal => 'Portail',
rules => 'Règles',
securedCookie => 'Cookie sécurisé (SSL)',
sessionParams => 'Paramètres des Sessions Parameters',
sessionStorage => 'Stockage des sessions',
timeout => 'Durée de vie des sessions',
userDB => "Type de base de données d'utilisateurs",
virtualHosts => 'Hôtes virtuels',
whatToTrace => "Donnée à inscrire dans les journaux d'Apache",
};
}
__END__
=pod
@ -42,168 +113,123 @@ __END__
sub en {
return {
apacheSessionModule => "Apache::Session module",
applyConf => "Apply",
areYouSure => "Are you sure ?",
authParams => "Authentication Parameters",
authenticationType => "Authentication Type",
canNotReadApplyConfFile => "Configuration not applied: cannot read configuration file",
changesAppliedLater => 'Changes will be effective within 10 minutes. Use "apachectl reload" on concerned servers for immediate reloading',
checkLogs => "Check Apache logs",
confSaved => "Configuration saved with number",
configLoaded => "Configuration loaded",
configuration => "Configuration",
configurationDeleted => "Configuration deleted",
configurationNotDeleted => "Configuration not deleted",
configurationWasChanged => "Configuration has been changed since you got it",
confirmDeleteConf => "You're going to delete configuration. Do you confirm ?",
cookieName => "Cookie Name",
containsAnAssignment => 'contains an assignment ("="). Possible confusion with "==".',
deleteConf => "Delete",
deleteNode => "Delete",
deleteVirtualHost => "Delete virtual host",
domain => "Domain",
error => "Error",
exportedVars => "Exported Variables",
field => "Field",
generalParameters => "General Parameters",
globalStorageOptions => "Session Storage Parameters",
group => "Group",
header => "Header",
httpHeaders => "HTTP Headers",
invalidLine => "Invalid Line",
invalidVirtualHostName => "Invalid virtual host name",
invalidWhatToTrace => "Data to use in Apache's logs can contain only an exported attribute or a macro",
isNotANumber => "is not a number",
isNotAValidAttributeName => "is not a valid attribute name",
isNotAValidCookieName => "is not a valid cookie name",
isNotAValidDomainName => "is not a valid domain name",
isNotAValidGroupName => "is not a valid group name",
isNotAValidHTTPHeaderName => "is not a valid HTTP header name",
isNotAValidLDAPAttributeName => "is not a valid LDAP attribute name",
isNotAValidMacroName => "is not a valid macro name",
isNotAValidVirtualHostName => "is not a valid virtual host name",
lastConf => "Last",
ldapBase => "LDAP Search Base",
ldapParameters => "LDAP Parameters",
ldapPort => "LDAP Server Port",
ldapServer => "LDAP Server",
locationRules => "Rules",
macro => "Macro",
macros => "Macros",
managerDn => "LDAP Account",
managerPassword => "LDAP Password",
newGSOpt => "New Option",
newGroup => "New Group",
newHeader => "New Header",
newMacro => "New Macro",
newRule => "New Rule",
newVar => "New Variable",
newVirtualHost => "New Virtual Host",
nextConf => "Next",
portal => "Portal",
prevConf => "Previous",
result => "Result",
rule => "Rule",
rules => "Rules",
saveConf => "Save",
saveFailure => "Save failure",
securedCookie => "Secured Cookie (SSL)",
sessionStorage => "Session Storage",
sessionTimeout => "Session timeout",
syntaxError => "Syntax error",
unableToSave => "Your browser does not support XMLHTTPRequest objects: fail to save.",
unknownError => "Unknown error",
unknownErrorInVars => "Unknown error in exported attributes",
userGroups => "User Groups",
value => "Value",
virtualHosts => "Virtual Hosts",
waitingResult => "Waiting result...",
warningConfNotApplied => "You have to reload handlers to take the saved configuration in account",
whatToTrace => "Attribute to use in Apache's logs",
apacheSessionModule => 'Apache::Session module',
applyConf => 'Apply',
areYouSure => 'Are you sure ?',
authenticationType => 'Authentication Type',
canNotReadApplyConfFile => 'Configuration not applied: cannot read configuration file',
changesAppliedLater => 'Changes will be effective within 10 minutes. Use "apachectl reload" on concerned servers for immediate reloading',
checkLogs => 'Check Apache logs',
confSaved => 'Configuration saved with number',
configLoaded => 'Configuration loaded',
configurationDeleted => 'Configuration deleted',
configurationNotDeleted => 'Configuration not deleted',
configurationWasChanged => 'Configuration has been changed since you got it',
confirmDeleteConf => "You're going to delete configuration. Do you confirm ?",
containsAnAssignment => 'contains an assignment ("="). Possible confusion with "==".',
deleteConf => 'Delete',
deleteNode => 'Delete',
deleteVirtualHost => 'Delete virtual host',
error => 'Error',
field => 'Field',
group => 'Group',
httpHeaders => 'HTTP Headers',
invalidLine => 'Invalid Line',
invalidVirtualHostName => 'Invalid virtual host name',
invalidWhatToTrace => "Data to use in Apache's logs can contain only an exported attribute or a macro",
isNotANumber => 'is not a number',
isNotAValidAttributeName => 'is not a valid attribute name',
isNotAValidCookieName => 'is not a valid cookie name',
isNotAValidDomainName => 'is not a valid domain name',
isNotAValidGroupName => 'is not a valid group name',
isNotAValidHTTPHeaderName => 'is not a valid HTTP header name',
isNotAValidLDAPAttributeName => 'is not a valid LDAP attribute name',
isNotAValidMacroName => 'is not a valid macro name',
isNotAValidVirtualHostName => 'is not a valid virtual host name',
lastConf => 'Last',
locationRules => 'Rules',
macro => 'Macro',
newGSOpt => 'New Option',
newGroup => 'New Group',
newHeader => 'New Header',
newMacro => 'New Macro',
newVar => 'New Variable',
newVirtualHost => 'New Virtual Host',
nextConf => 'Next',
prevConf => 'Previous',
result => 'Result',
rule => 'Rule',
saveConf => 'Save',
saveFailure => 'Save failure',
syntaxError => 'Syntax error',
unableToSave => 'Your browser does not support XMLHTTPRequest objects: fail to save.',
unknownError => 'Unknown error',
unknownErrorInVars => 'Unknown error in exported attributes',
userGroups => 'User Groups',
value => 'Value',
waitingResult => 'Waiting result...',
warningConfNotApplied => 'You have to reload handlers to take the saved configuration in account',
};
}
sub fr {
return {
apacheSessionModule => "Module Apache::Session",
applyConf => "Appliquer",
areYouSure => "Êtes vous sur ?",
authParams => "Paramètres d'authentification",
authenticationType => "Type d'authentification",
canNotReadApplyConfFile => "Configuration non appliquée: impossible de lire le fichier de configuration",
changesAppliedLater => "Les changements seront effectifs d'ici 10 minutes. Utilisez \"apachectl reload\" sur les serveurs concernés pour forcer la prise en compte immédiate",
checkLogs => "Consultez les journaux d'Apache",
confSaved => "Configuration sauvegardée sous le numéro",
configLoaded => "Configuration chargée",
configuration => "Configuration",
configurationDeleted => "Configuration éffacée",
configurationNotDeleted => "Configuration non éffacée",
configurationWasChanged => "configuration modifiée depuis que vous l'avez téléchargée",
confirmDeleteConf => "Vous allez effacer cette configuration. Confirmez-vous ?",
cookieName => "Nom du cookie",
containsAnAssignment => 'contient une affectation ("="). Confusion possible avec "==".',
deleteConf => "Effacer",
deleteNode => "Supprimer",
deleteVirtualHost => "Supprimer l'hôte virtuel",
domain => "Domaine",
error => "Erreur",
exportedVars => "Attributs LDAP à exporter",
field => "Champ",
generalParameters => "Paramètres généraux",
globalStorageOptions => "Paramètres du module Apache::Session",
group => "Groupe",
header => "En-tête",
httpHeaders => "En-têtes HTTP",
invalidLine => "Ligne invalide",
invalidVirtualHostName => "Nom de d'hôte virtuel incorrect",
invalidWhatToTrace => "La donnée à inscrire dans les journaux ne peut contenir qu'un attribut exporté ou une macro",
isNotANumber => "n'est pas un nombre",
isNotAValidAttributeName => "n'est pas un nom d'attribut valide",
isNotAValidCookieName => "n'est pas un nom de cookie valide",
isNotAValidDomainName => "n'est pas un nom de domaine valide",
isNotAValidGroupName => "n'est pas un nom de groupe valide",
isNotAValidHTTPHeaderName => "n'est pas un nom d'en-tête HTTP valide",
apacheSessionModule => 'Module Apache::Session',
applyConf => 'Appliquer',
areYouSure => 'Êtes vous sur ?',
authenticationType => "Type d'authentification",
canNotReadApplyConfFile => 'Configuration non appliquée: impossible de lire le fichier de configuration',
changesAppliedLater => "Les changements seront effectifs d'ici 10 minutes. Utilisez \"apachectl reload\" sur les serveurs concernés pour forcer la prise en compte immédiate",
checkLogs => "Consultez les journaux d'Apache",
confSaved => 'Configuration sauvegardée sous le numéro',
configLoaded => 'Configuration chargée',
configurationDeleted => 'Configuration éffacée',
configurationNotDeleted => 'Configuration non éffacée',
configurationWasChanged => "configuration modifiée depuis que vous l'avez téléchargée",
confirmDeleteConf => 'Vous allez effacer cette configuration. Confirmez-vous ?',
containsAnAssignment => 'contient une affectation ("="). Confusion possible avec "==".',
deleteConf => 'Effacer',
deleteNode => 'Supprimer',
deleteVirtualHost => "Supprimer l'hôte virtuel",
error => 'Erreur',
field => 'Champ',
group => 'Groupe',
httpHeaders => 'En-têtes HTTP',
invalidLine => 'Ligne invalide',
invalidVirtualHostName => "Nom de d'hôte virtuel incorrect",
invalidWhatToTrace => "La donnée à inscrire dans les journaux ne peut contenir qu'un attribut exporté ou une macro",
isNotANumber => "n'est pas un nombre",
isNotAValidAttributeName => "n'est pas un nom d'attribut valide",
isNotAValidCookieName => "n'est pas un nom de cookie valide",
isNotAValidDomainName => "n'est pas un nom de domaine valide",
isNotAValidGroupName => "n'est pas un nom de groupe valide",
isNotAValidHTTPHeaderName => "n'est pas un nom d'en-tête HTTP valide",
isNotAValidLDAPAttributeName => "n'est pas un nom d'attribut LDAP valide",
isNotAValidMacroName => "n'est pas un nom de macro valide",
isNotAValidVirtualHostName => "n'est pas un nom d'hôte virtuel valide",
lastConf => "Dernière",
ldapBase => "Base de recherche LDAP",
ldapParameters => "Paramètres LDAP",
ldapPort => "Port du serveur LDAP",
ldapServer => "Serveur LDAP",
locationRules => "Règles",
macro => "Macro",
macros => "Macros",
managerDn => "Compte de connexion LDAP",
managerPassword => "Mot de passe LDAP",
newGSOpt => "Nouvelle option",
newGroup => "Nouveau groupe",
newHeader => "Nouvel en-tête",
newMacro => "Nouvelle macro",
newRule => "Nouvelle règle",
newVar => "Nouvelle variable",
newVirtualHost => "Nouvel hôte virtuel",
nextConf => "Suivante",
portal => "Portail",
prevConf => "Précédente",
result => "Résultat",
rule => "Règle",
rules => "Règles",
saveConf => "Sauvegarder",
saveFailure => "Échec de la sauvegarde",
securedCookie => "Cookie sécurisé (SSL)",
sessionStorage => "Stockage des sessions",
sessionTimeout => "Durée de vie des sessions",
syntaxError => "Erreur de syntaxe",
unableToSave => "Votre navigateur ne supporte pas les objets XMLHTTPRequest: sauvegarde impossible.",
unknownError => "Erreur inconnue",
unknownErrorInVars => "Erreur inconnue dans les attributs exportés",
userGroups => "Groupes d'utilisateurs",
value => "Valeur",
virtualHosts => "Hôtes virtuels",
waitingResult => "En attente...",
warningConfNotApplied => "Vous devez recharger les agents pour que la configuration sauvegardée soit appliquée",
whatToTrace => "Donnée à inscrire dans les journaux d'Apache",
isNotAValidMacroName => "n'est pas un nom de macro valide",
isNotAValidVirtualHostName => "n'est pas un nom d'hôte virtuel valide",
lastConf => 'Dernière',
locationRules => 'Règles',
macro => 'Macro',
macros => 'Macros',
newGSOpt => 'Nouvelle option',
newGroup => 'Nouveau groupe',
newHeader => 'Nouvel en-tête',
newMacro => 'Nouvelle macro',
newVar => 'Nouvelle variable',
newVirtualHost => 'Nouvel hôte virtuel',
nextConf => 'Suivante',
prevConf => 'Précédente',
result => 'Résultat',
rule => 'Règle',
saveConf => 'Sauvegarder',
saveFailure => 'Échec de la sauvegarde',
syntaxError => 'Erreur de syntaxe',
unableToSave => 'Votre navigateur ne supporte pas les objets XMLHTTPRequest: sauvegarde impossible.',
unknownError => 'Erreur inconnue',
unknownErrorInVars => 'Erreur inconnue dans les attributs exportés',
userGroups => "Groupes d'utilisateurs",
value => 'Valeur',
waitingResult => 'En attente...',
warningConfNotApplied => 'Vous devez recharger les agents pour que la configuration sauvegardée soit appliquée',
};
}

Some files were not shown because too many files have changed in this diff Show More