From 41571ba1b205bdafd13cd7ed442dbc04cbbeee3a Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 19 Jul 2006 07:01:34 +0000 Subject: [PATCH] Added certificate acls git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4220 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/generic/class_user.inc | 7 +++++- plugins/personal/generic/generic_certs.tpl | 28 +++++++++++++++++----- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index 06d7605f3..be511d51c 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -154,6 +154,8 @@ class user extends plugin $this->base= dn2base($dn); } + echo $this->base; + /* get password storage type */ if (isset ($this->attrs['userPassword'][0])){ /* Initialize local array */ @@ -357,7 +359,7 @@ class user extends plugin /* Want certificate= */ - if (isset($_POST['edit_cert'])){ + if ((isset($_POST['edit_cert'])) && $this->acl_is_readable("Certificate")){ /* Save original values for later reconstruction */ foreach (array("certificateSerialNumber", "userCertificate", @@ -446,6 +448,9 @@ class user extends plugin /* Display cert dialog */ if ($this->cert_dialog){ + $smarty->assign("CertificateACL",$this->getacl("Certificate")); + $smarty->assign("Certificate_readable",$this->acl_is_readable("Certificate")); + foreach(array("userCertificate", "userSMIMECertificate", "userPKCS12") as $cert){ if ($this->$cert != ""){ /* import certificate */ diff --git a/plugins/personal/generic/generic_certs.tpl b/plugins/personal/generic/generic_certs.tpl index f39a4e174..0b5e7597c 100644 --- a/plugins/personal/generic/generic_certs.tpl +++ b/plugins/personal/generic/generic_certs.tpl @@ -7,15 +7,20 @@ {t}Standard certificate{/t} + - + {if $userCertificate_state ne "true"} + {render acl=$CertificateACL} + {/render} {else} + {render acl=$CertificateACL} - {/if} + {/render} + {/if} @@ -28,13 +33,17 @@ {t}S/MIME certificate{/t} - + {if $userSMIMECertificate_state ne "true"} + {render acl=$CertificateACL} + {/render} {else} + {render acl=$CertificateACL} + {/render} {/if} @@ -48,13 +57,17 @@ {t}PKCS12 certificate{/t} - + {if $userPKCS12_state ne "true"} + {render acl=$CertificateACL} + {/render} {else} + {render acl=$CertificateACL} + {/render} {/if} @@ -65,15 +78,18 @@ - + {render acl=$CertificateACL} + + {/render} {/if}

+ {render acl=$CertificateACL} + {/render}  

-- 2.30.2