summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e58dc10)
raw | patch | inline | side by side (parent: e58dc10)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 14 May 2007 08:16:46 +0000 (08:16 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 14 May 2007 08:16:46 +0000 (08:16 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6364 594d385d-05f5-0310-b6e9-bd551577e9d8
17 files changed:
diff --git a/plugins/personal/connectivity/class_intranetAccount.inc b/plugins/personal/connectivity/class_intranetAccount.inc
index 367903914b48dcc1a2445b0c0c138e08ae12fd23..845ab01bba14c2c3ccfad045d045959760c4808a 100644 (file)
<?php
+
+
/*!
\author Harald Falk <hf@doellken-weimar.de>
\version 1.00
{
plugin::plugin ($config, $dn,$parent);
- /* Setting uid to default */
- if(isset($this->attrs['uid'][0])){
- $this->uid = $this->attrs['uid'][0];
- }
+ /* Setting uid to default */
+ if(isset($this->attrs['uid'][0])){
+ $this->uid = $this->attrs['uid'][0];
+ }
+
+ /* Log view */
+ if($this->is_account){
+ @log::log("view","users/".get_class($this),$this->dn);
+ }
}
/*!
$this->cleanup();
$ldap->modify ($this->attrs);
+ /* Log last action */
+ @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/intranet account with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */
$this->cleanup();
$ldap->modify ($this->attrs);
+ /* Log last action */
+ if($this->initially_was_account){
+ @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }else{
+ @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }
+
show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/intranet account with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */
diff --git a/plugins/personal/connectivity/class_kolabAccount.inc b/plugins/personal/connectivity/class_kolabAccount.inc
index b038cd9c741eb47eef94e9a951e01b4d75387c66..0b09fdc51c1136b1d1bc682f653c08c9e18702ba 100644 (file)
$this->is_account = false;
$this->mail_Account = false;
}
+
+ /* Log view */
+ if($this->is_account){
+ @log::log("view","users/".get_class($this),$this->dn);
+ }
}
$ldap->cd ($this->dn);
$ldap->modify($this->attrs);
+ /* Log last action */
+ @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
$this->handle_post_events('remove',array("uid" => $this->uid));
show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/kolab account with dn '%s' failed."),$this->dn));
}
$this->cleanup();
$ldap->modify ($this->attrs);
+ /* Log last action */
+ if($this->initially_was_account){
+ @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }else{
+ @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }
+
show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/kolab account with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */
diff --git a/plugins/personal/connectivity/class_opengwAccount.inc b/plugins/personal/connectivity/class_opengwAccount.inc
index 5f6058e5a1071e4271285d1955b394acc5d21f5e..9be419d929064e03aef707348a0c530387a97600 100644 (file)
/* Transmit data back to ogw handle */
$this->handle->SetInfos($this->info);
}
+
+ /* Log view */
+ if($this->is_account){
+ @log::log("view","users/".get_class($this),$this->dn);
+ }
+
}
function execute()
$this->handle = new ogw($this->serverCon['LOGIN'],$this->serverCon['PASSWORD'],$this->serverCon['SERVER'],$this->serverCon['DB']);
$this->handle->SetInfos($this->info);
$this->handle->Perform("REMOVE");
+
+ @log::log("remove","users/".get_class($this),$this->dn);
}
}
$this->handle->checkInfos();
if($this->initialy_was_account){
$this->handle->Perform("EDIT");
+ @log::log("modify","users/".get_class($this),$this->dn);
}else{
$this->handle->Perform("ADD");
+ @log::log("create","users/".get_class($this),$this->dn);
}
}
diff --git a/plugins/personal/connectivity/class_oxchangeAccount.inc b/plugins/personal/connectivity/class_oxchangeAccount.inc
index ca660a8ac85cda41843b7b83892a7c0e35af011d..7445985a2e1c1575862b75685b4d925ec4fc7cef 100644 (file)
if(isset($this->attrs[$this->dnmode][0])){
$this->dnModeValue = $this->attrs[$this->dnmode][0];
}
+
+ /* Log view */
+ if($this->is_account){
+ @log::log("view","users/".get_class($this),$this->dn);
+ }
+
}
function execute()
$this->attributes, "Save");
$this->cleanup();
$ldap->modify ($this->attrs);
+
+ @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/oxchange addressbook account with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */
$this->cleanup();
$ldap->modify ($this->attrs);
+ if($this->initially_was_account){
+ @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }else{
+ @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }
+
show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/oxchange account with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */
diff --git a/plugins/personal/connectivity/class_phpgwAccount.inc b/plugins/personal/connectivity/class_phpgwAccount.inc
index ce14d589c42da20310a3d829a7dd8e2af64cd991..4a1745f43b6b0bdbec3451bdd050221f76768971 100644 (file)
$this->uid = $this->attrs['uid'][0];
}
+
+ if($this->is_account){
+ @log::log("view","users/".get_class($this),$this->dn);
+ }
}
function execute()
show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/PHPgw account with dn '%s' failed."),$this->dn));
+ @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
/* Optionally execute a command after we're done */
$this->handle_post_events('remove',array("uid" => $this->uid));
}
$this->cleanup();
$ldap->modify ($this->attrs);
+ if($this->initially_was_account){
+ @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }else{
+ @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }
+
show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/PHPgw account with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */
} else {
$this->handle_post_events("add",array("uid" => $this->uid));
}
+
}
diff --git a/plugins/personal/connectivity/class_phpscheduleitAccount.inc b/plugins/personal/connectivity/class_phpscheduleitAccount.inc
index a744b2dae4b8a221dcb1848a73ea2ca847e94371..56cd7fc7853994afff3709bc5b5013e7390b4d09 100644 (file)
function phpscheduleitAccount ($config, $dn= NULL)
{
plugin::plugin ($config, $dn);
+
+ if($this->is_account){
+ @log::log("view","users/".get_class($this),$this->dn);
+ }
}
function execute()
$ldap->modify ($this->attrs);
show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/PHPscheduleit account with dn '%s' failed."),$this->dn));
+ if($this->is_account){
+ @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }
/* Optionally execute a command after we're done */
$this->handle_post_events('remove',array("uid" => $this->uid));
}
$this->cleanup();
$ldap->modify ($this->attrs);
+ if($this->initially_was_account){
+ @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }else{
+ @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }
+
show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/PHPscheduleit account with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */
diff --git a/plugins/personal/connectivity/class_pptpAccount.inc b/plugins/personal/connectivity/class_pptpAccount.inc
index 96c8dea6c30954ae0a10c37a7efffa671b251922..3a0e15f60049d9f6c2867665778cda6227f54016 100644 (file)
$this->uid = $this->attrs['uid'][0];
}
+ /* Log view */
+ if($this->is_account){
+ @log::log("view","users/".get_class($this),$this->dn);
+ }
+
}
function execute()
$this->cleanup();
$ldap->modify ($this->attrs);
+ /* Log last action */
+ @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/PPTP account with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */
$this->cleanup();
$ldap->modify ($this->attrs);
+ /* Log last action */
+ if($this->initially_was_account){
+ @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }else{
+ @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }
+
show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/PPTP account with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */
diff --git a/plugins/personal/connectivity/class_proxyAccount.inc b/plugins/personal/connectivity/class_proxyAccount.inc
index dbb0f79354fa5d85bfd137e525b8959b54a63d69..497166060ba5552bc8815ab2af2c3b52425299f6 100644 (file)
$this->uid = $this->attrs['uid'][0];
}
+ /* Log view */
+ if($this->is_account){
+ @log::log("view","users/".get_class($this),$this->dn);
+ }
}
function execute()
$this->cleanup();
$ldap->modify ($this->attrs);
+ /* Log last action */
+ @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/proxy account with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */
$this->cleanup();
$ldap->modify ($this->attrs);
+ /* Log last action */
+ if($this->initially_was_account){
+ @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }else{
+ @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }
+
show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/proxy account with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */
diff --git a/plugins/personal/connectivity/class_pureftpdAccount.inc b/plugins/personal/connectivity/class_pureftpdAccount.inc
index 1069f60c91062d202626a348f834659249aa2ed5..b9abfbf64627ebb253ffcf7975593a4ad09c3476 100644 (file)
$this->uid = $this->attrs['uid'][0];
}
+ /* Log view */
+ if($this->is_account){
+ @log::log("view","users/".get_class($this),$this->dn);
+ }
}
function execute()
$this->cleanup();
$ldap->modify ($this->attrs);
+ /* Log last action */
+ @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/pureftpd account with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */
$ldap->cd($this->dn);
$this->cleanup();
$ldap->modify ($this->attrs);
+
+ /* Log last action */
+ if($this->initially_was_account){
+ @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }else{
+ @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }
show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/pureftpd account with dn '%s' failed."),$this->dn));
diff --git a/plugins/personal/connectivity/class_webdavAccount.inc b/plugins/personal/connectivity/class_webdavAccount.inc
index dfc9352be5122e93666683c24e294dfd8e062e18..de2202873054b51f862e7a0da7a39eb9e7d34de3 100644 (file)
$this->uid = $this->attrs['uid'][0];
}
+ /* Log view */
+ if($this->is_account){
+ @log::log("view","users/".get_class($this),$this->dn);
+ }
}
function execute()
$this->cleanup();
$ldap->modify ($this->attrs);
+ /* Log last action */
+ @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/webDAV account with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */
$this->cleanup();
$ldap->modify ($this->attrs);
+ /* Log last action */
+ if($this->initially_was_account){
+ @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }else{
+ @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }
+
show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/webDAV account with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */
diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc
index 0f3d93059edbc5011c79b74757ac1017b77190bb..f8ad1f0b1127c2654d30b16d5112bbec8519d13a 100644 (file)
$this->cleanup();
$ldap->$mode($this->attrs);
- if($mode == "modify"){
+ /* Log last action */
+ if($this->initially_was_account){
@log::log("modify","users/environment",$this->dn,array_keys($this->attrs),$ldap->get_error());
}else{
@log::log("create","users/environment",$this->dn,array_keys($this->attrs),$ldap->get_error());
index 71e11b99f5316cc869345ee577cebd776844686a..193143566ae7c5e6f0044577c117f58a0e16b527 100644 (file)
if ($dn == "new"){
$this->is_account= TRUE;
}else{
- @log::log("view","users/user",$dn);
+ @log::log("view","users/".get_class($this),$this->dn);
}
/* Make hash default to md5 if not set in config */
$ldap->rmdir ($this->dn);
show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/generic account with dn '%s' failed."),$this->dn));
- @log::log("remove","users/user",$dn,$this->attributes,$ldap->get_error());
+ @log::log("remove","users/".get_class($this),$this->dn,$this->attributes,$ldap->get_error());
/* Delete references to groups */
$ldap->cd ($this->config->current['BASE']);
}
if($mode == "modify"){
- @log::log("modify","users/user",$this->dn,array_keys($this->attrs),$ldap->get_error());
+ @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}else{
- @log::log("create","users/user",$this->dn,array_keys($this->attrs),$ldap->get_error());
+ @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
/* Remove cert?
diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc
index 9c5dfddc9c62cb4e3150ff09e5926ffc7c7710ec..0221fd4e0e95bce8ffb3dc0a79b7238f2f0e888f 100644 (file)
"regex" => "*");
register_global("mailfilter", $mailfilter);
}
+
+ /* Add "view" to logging class */
+ if($this->is_account){
+ @log::log("view","users/".get_class($this),$this->dn);
+ }
}
$ldap->modify ($this->attrs);
+ /* Add "view" to logging class */
+ @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/mail account with dn '%s' failed."),$this->dn));
/* Connect to IMAP server for account deletion */
show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/mail account with dn '%s' failed."),$this->dn));
+ /* Log last action */
+ if($this->initially_was_account){
+ @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }else{
+ @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }
+
/* Only do IMAP actions if we are not a template */
if (!$this->is_template){
diff --git a/plugins/personal/nagios/class_nagiosAccount.inc b/plugins/personal/nagios/class_nagiosAccount.inc
index 9f32138a1021369a527ee56b28d77a008e6cc21f..0e0a09d478218af554cdb8902ad0b383a49b28b1 100644 (file)
/* Save initial account state */
$this->initially_was_account= $this->is_account;
+
+ if($this->is_account){
+ @log::log("view","users/".get_class($this),$this->dn);
+ }
}
function execute()
$this->cleanup();
$ldap->modify ($this->attrs);
+ /* Log last action */
+ if($this->initially_was_account){
+ @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }else{
+ @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }
+
show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/nagios account with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */
$this->cleanup();
$ldap->modify ($this->attrs);
+ @log::log("view","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/nagios account with dn '%s' failed."),$this->dn));
/* remove the entry from LDAP */
diff --git a/plugins/personal/netatalk/class_netatalk.inc b/plugins/personal/netatalk/class_netatalk.inc
index 1d06faac49c81968c6b56a138208819cdbe65b48..4d772a8c263f71912cc122c348a05332a13af671 100644 (file)
/* Save initial account state */
$this->initially_was_account = $this->is_account;
+
+ if($this->is_account){
+ @log::log("view","users/".get_class($this),$this->dn);
+ }
}
$this->cleanup();
$ldap->modify($this->attrs);
+ if($this->initially_was_account){
+ @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }else{
+ @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }
+
show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/netatalk account with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */
$this->cleanup();
$ldap->modify($this->attrs);
+ @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/netatalk account with dn '%s' failed."),$this->dn));
/* remove the entry from LDAP */
diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc
index 4dece52c5e6bcec4366630c972fb3a61207c855c..f8068ce63bbfeb75597bddc1eec5b8206d028c69 100644 (file)
$ldap= $this->config->get_ldap_link();
if($this->is_account){
- @log::log("view","users/posix",$this->dn);
+ @log::log("view","users/".get_class($this),$this->dn);
}
if ($dn != NULL){
$this->cleanup();
$ldap->modify ($this->attrs);
- @log::log("remove","users/posix",$this->dn,array_keys($this->attrs),$ldap->get_error());
+ @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/posix account with dn '%s' failed."),$this->dn));
unset($this->attrs['uid']);
$ldap->modify ($this->attrs);
- @log::log("modify","users/posix",$this->dn,array_keys($this->attrs),$ldap->get_error());
+ /* Log last action */
+ if($this->initially_was_account){
+ @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }else{
+ @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }
show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/posix account with dn '%s' failed."),$this->dn));
diff --git a/plugins/personal/samba/class_sambaAccount.inc b/plugins/personal/samba/class_sambaAccount.inc
index 879f4e6ba5a6d76b1a66e747ad0c8b901e839049..c9b2667191557bf5ce81eed38956ff59405cac66 100644 (file)
/* Save initial account state */
$this->initially_was_account= $this->is_account;
+
+ if($this->is_account){
+ @log::log("view","users/".get_class($this),$this->dn);
+ }
}
function execute()
$this->cleanup();
$ldap->modify ($this->attrs);
+ @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/samba account with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */
$this->cleanup();
$ldap->modify ($this->attrs);
+ if($this->initially_was_account){
+ @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }else{
+ @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }
+
show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/samba account with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */