summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6d9ca24)
raw | patch | inline | side by side (parent: 6d9ca24)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 11 Jan 2007 09:36:26 +0000 (09:36 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 11 Jan 2007 09:36:26 +0000 (09:36 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5531 594d385d-05f5-0310-b6e9-bd551577e9d8
index 19e7305f50c1b898027a482e1a4a945db6738aa0..651c2dd307702b6d9314e57b105040ab889f7864 100644 (file)
) ;
$ACLD['netatalk']= array(
+ "create",
"netatalkShare",
"netatalkUserHomepath");
$ACLD['phoneAccount'] = array("create","goFonDeliveryMode","goFonHomeServer",
"goFonHardware","goFonPIN","goFonVoicemailPIN","telephoneNumber", "goFonMacro");
-$ACLD['nagiosAccount'] = array("NagiosAlias"
-, "NagiosPager"
-, "NagiosMail"
-, "HostNotificationPeriod"
-, "ServiceNotificationPeriod"
-, "HostNotificationCommands"
-, "ServiceNotificationCommands"
-, "HostNotificationOptions"
-, "ServiceNotificationOptions"
-, "AuthorizedAllHosts"
-, "AuthorizedAllServices"
-, "AuthorizedSystemCommands"
-, "AuthorizedAllHostCommands"
-, "AuthorizedAllServiceCommands"
-, "AuthorizedConfigurationInformation"
-, "AuthorizedSystemInformation");
+$ACLD['nagiosAccount'] = array(
+ "create",
+ "NagiosAlias",
+ "NagiosPager",
+ "NagiosMail",
+ "HostNotificationPeriod",
+ "ServiceNotificationPeriod",
+ "HostNotificationCommands",
+ "ServiceNotificationCommands",
+ "HostNotificationOptions",
+ "ServiceNotificationOptions",
+ "AuthorizedAllHosts",
+ "AuthorizedAllServices",
+ "AuthorizedSystemCommands",
+ "AuthorizedAllHostCommands",
+ "AuthorizedAllServiceCommands",
+ "AuthorizedConfigurationInformation",
+ "AuthorizedSystemInformation");
$ACLD['addressbook']= array("addressbook","add", "delete",
"sn", "givenName", "mail", "title",
diff --git a/plugins/personal/nagios/class_nagiosAccount.inc b/plugins/personal/nagios/class_nagiosAccount.inc
index ac489538ac5815cb274511262e390508b276ba8b..768483f1aad8f1468ec7df0bfb7976f3a9ab5d5a 100644 (file)
/* Do we need to flip is_account state? */
if (isset($_POST['modify_state'])){
- $this->is_account= !$this->is_account;
+
+ /* Onyl change account state if allowed */
+ if($this->is_account && $this->acl == "#all#"){
+ $this->is_account= !$this->is_account;
+ }elseif(!$this->is_account && chkacl($this->acl,"create") == ""){
+ $this->is_account= !$this->is_account;
+ }
}
/* Do we represent a valid account? */
diff --git a/plugins/personal/netatalk/class_netatalk.inc b/plugins/personal/netatalk/class_netatalk.inc
index 57edb1464129c6f57601892e8a88814199f23312..c2122330d64bad8f3db3bc0744dc10ffe5f03f9a 100644 (file)
$smarty = get_smarty();
$display = "";
+
+ /* Check if all dependencies are solved */
+ $all_ok = (isset($this->parent->by_object['posixAccount']) && $this->parent->by_object['posixAccount']->is_account) &&
+ (count($this->shares));
+
/* Do we need to flip is_account state? */
- if (isset ($_POST['modify_state'])) {
- $this->is_account = !$this->is_account;
+ if (isset($_POST['modify_state'])){
+
+ /* Onyl change account state if allowed */
+ if($this->is_account && $this->acl == "#all#" && !$this->accountDelegationsConfigured()){
+ $this->is_account= !$this->is_account;
+ }elseif(!$this->is_account && chkacl($this->acl,"create") == "" && $all_ok){
+ $this->is_account= !$this->is_account;
+ }
}
/* Do we represent a valid account? */