summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aeb6d2c)
raw | patch | inline | side by side (parent: aeb6d2c)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 1 Mar 2010 14:29:07 +0000 (14:29 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 1 Mar 2010 14:29:07 +0000 (14:29 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15802 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/personal/generic/class_user.inc | patch | blob | history |
diff --git a/gosa-core/plugins/personal/generic/class_user.inc b/gosa-core/plugins/personal/generic/class_user.inc
index 10c4eba291c388e4c8e4d35f1fb15fad51627faf..8bb519724d0dcd165d361570d101b01a6ac2f800 100644 (file)
plugin::execute();
/* Set list ACL */
- $this->gosaLoginRestrictionWidget->setAcl($this->getacl('gosaLoginRestriction', (!is_object($this->parent) && !session::is_set('edit'))));
+ $this->gosaLoginRestrictionWidget->setAcl($this->getacl('gosaLoginRestriction'));
$this->gosaLoginRestrictionWidget->update();
/* Handle add/delete for restriction mode */
if(preg_match("/ editManager/i", " ".implode(array_keys($_POST),' ')." ")){
$this->dialog = new singleUserSelect($this->config, get_userinfo());
}
- if($this->dialog && count($this->dialog->detectPostActions())){
+ if($this->dialog && $this->dialog instanceOf singleUserSelect && count($this->dialog->detectPostActions())){
$users = $this->dialog->detectPostActions();
if(isset($users['targets']) && count($users['targets'])){
if(isset($_POST['add_users_cancel'])){
$this->dialog = NULL;
}
- if($this->dialog) return($this->dialog->execute());
+ if($this->dialog instanceOf singleUserSelect) return($this->dialog->execute());
$smarty= get_smarty();
}
/* Remove picture? */
- if($this->acl_is_writeable("userPicture",(!is_object($this->parent) && !session::is_set('edit'))) ){
+ if($this->acl_is_writeable("userPicture")){
if (isset($_POST['picture_remove'])){
$this->set_picture ();
$this->jpegPhoto= "*removed*";
/* Remove certificate? */
- if($this->acl_is_writeable("Certificate",(!is_object($this->parent) && !session::is_set('edit')))){
+ if($this->acl_is_writeable("Certificate")){
foreach (array ("userCertificate", "userSMIMECertificate", "userPKCS12") as $val){
if (isset($_POST["remove_$val"])){
}
/* Upload new cert and close dialog? */
- if($this->acl_is_writeable("Certificate",(!is_object($this->parent) && !session::is_set('edit')))){
-
+ if($this->acl_is_writeable("Certificate")){
$fail =false;
-
if (isset($_POST['cert_edit_finish'])){
/* for all certificates do */
/* Display cert dialog */
if ($this->cert_dialog){
- $smarty->assign("CertificateACL",$this->getacl("Certificate",(!is_object($this->parent) && !session::is_set('edit'))));
+ $smarty->assign("CertificateACL",$this->getacl("Certificate"));
$smarty->assign("Certificate_readable",$this->acl_is_readable("Certificate"));
$smarty->assign("certificateSerialNumber",$this->certificateSerialNumber);
/* Set acls */
$tmp = $this->plinfo();
foreach($tmp['plProvidedAcls'] as $val => $translation){
- $smarty->assign("$val"."ACL", $this->getacl($val,(!is_object($this->parent) && !session::is_set('edit'))));
+ $smarty->assign("$val"."ACL", $this->getacl($val));
}
// Special ACL for gosaLoginRestrictions -
// In case of multiple edit, we need a readonly ACL for the list.
- $smarty->assign('gosaLoginRestriction_ONLY_R_ACL',
- preg_replace("/[^r]/i","", $this->getacl($val,(!is_object($this->parent) && !session::is_set('edit')))));
+ $smarty->assign('gosaLoginRestriction_ONLY_R_ACL', preg_replace("/[^r]/i","", $this->getacl($val)));
$smarty->assign("pwmode", $pwd_methods);
$smarty->assign("pwmode_select", $this->pw_storage);
$smarty->assign("pw_configurable", $is_configurable);
- $smarty->assign("passwordStorageACL", $this->getacl("userPassword",(!is_object($this->parent) && !session::is_set('edit'))));
-
- if(!session::is_set('edit')){
- $smarty->assign("CertificatesACL","");
- }else{
- $smarty->assign("CertificatesACL", $this->getacl("Certificate"));
- }
-
- $smarty->assign("userPictureACL", $this->getacl("userPicture",(!is_object($this->parent) && !session::is_set('edit'))));
- $smarty->assign("userPicture_is_readable", $this->acl_is_readable("userPicture",(!is_object($this->parent) && !session::is_set('edit'))));
+ $smarty->assign("passwordStorageACL", $this->getacl("userPassword"));
+ $smarty->assign("CertificatesACL", $this->getacl("Certificate"));
+ $smarty->assign("userPictureACL", $this->getacl("userPicture"));
+ $smarty->assign("userPicture_is_readable", $this->acl_is_readable("userPicture"));
/* Create base acls */
$smarty->assign("base", $this->baseSelector->render());
$smarty->assign("ivbbmodes", $ivbbmodes);
foreach ($this->govattrs as $val){
$smarty->assign("$val", $this->$val);
- $smarty->assign("$val"."ACL", $this->getacl($val,(!is_object($this->parent) && !session::is_set('edit'))));
+ $smarty->assign("$val"."ACL", $this->getacl($val));
}
} else {
$smarty->assign("governmentmode", "false");
}
/* Special mode for uid */
- $uidACL= $this->getacl("uid",(!is_object($this->parent) && !session::is_set('edit')));
+ $uidACL= $this->getacl("uid");
if (isset ($this->dn)){
if ($this->dn != "new"){
$uidACL= preg_replace("/w/","",$uidACL);
/* Save government mode attributes */
if ($this->governmentmode){
foreach ($this->govattrs as $val){
- if ($this->acl_is_writeable($val,(!is_object($this->parent) && !session::is_set('edit'))) && isset($_POST["$val"])){
+ if ($this->acl_is_writeable($val)){
$data= stripcslashes($_POST["$val"]);
if ($data != $this->$val){
$this->is_modified= TRUE;
/* Load certificate from file to object */
function set_cert($cert, $filename)
{
- if(!$this->acl_is_writeable("Certificate",(!is_object($this->parent) && !session::is_set('edit')))) return;
+ if(!$this->acl_is_writeable("Certificate")) return;
$fd = fopen ($filename, "rb");
if (filesize($filename)>0) {
$this->$cert= fread ($fd, filesize ($filename));