summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: db30fd1)
raw | patch | inline | side by side (parent: db30fd1)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 10 Nov 2008 07:50:33 +0000 (07:50 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 10 Nov 2008 07:50:33 +0000 (07:50 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12976 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_plugin.inc | patch | blob | history | |
gosa-core/include/class_userinfo.inc | patch | blob | history | |
gosa-core/include/functions.inc | patch | blob | history |
index 56c608c30a72ccbcdc3345f9fbbeaec874c0be84..2c804e967ad20073832cd07e700064cb0fd23e45 100644 (file)
var $acl_base= "";
var $acl_category= "";
+ var $read_only = FALSE; // Used when the entry is opened as "readonly" due to locks.
/* This can be set to render the tabulators in another stylesheet */
var $pl_notify= FALSE;
return;
}
+ if(isset($_POST['open_readonly'])){
+ $this->read_only = TRUE;
+ }
+
/* Save current dn as acl_base */
$this->acl_base= $dn;
function acl_is_writeable($attribute,$skip_write = FALSE)
{
+ if($this->read_only) return(FALSE);
$ui= get_userinfo();
return preg_match('/w/', $ui->get_permissions($this->acl_base, $this->acl_category.get_class($this), $attribute, $skip_write));
}
function acl_is_createable($base ="")
{
+ if($this->read_only) return(FALSE);
$ui= get_userinfo();
if($base == "") $base = $this->acl_base;
return preg_match('/c/', $ui->get_permissions($base, $this->acl_category.get_class($this), '0'));
function acl_is_removeable($base ="")
{
+ if($this->read_only) return(FALSE);
$ui= get_userinfo();
if($base == "") $base = $this->acl_base;
return preg_match('/d/', $ui->get_permissions($base, $this->acl_category.get_class($this), '0'));
function acl_is_moveable($base = "")
{
+ if($this->read_only) return(FALSE);
$ui= get_userinfo();
if($base == "") $base = $this->acl_base;
return preg_match('/m/', $ui->get_permissions($base, $this->acl_category.get_class($this), '0'));
function getacl($attribute,$skip_write= FALSE)
{
$ui= get_userinfo();
+ $skip_write |= $this->read_only;
return $ui->get_permissions($this->acl_base, $this->acl_category.get_class($this), $attribute,$skip_write);
}
index 2b987ad1ef501ea6cd3d1b124480753e46b23b16..08e232de746e1c7f0b263c45eac5c3995d2d5d5f 100644 (file)
if (isset($ACL_CACHE["$dn+$object+$attribute"])){
$ret = $ACL_CACHE["$dn+$object+$attribute"];
if($skip_write){
- $ret = str_replace('w', '',$ret);
+ $ret = str_replace(array('w','c','d','m'), '',$ret);
}
return($ret);
}
/* Remove write if needed */
if ($skip_write){
- $ret= str_replace('w', '', $ret);
+ $ret = str_replace(array('w','c','d','m'), '',$ret);
}
return ($ret);
}
index 071ec2903ad26e94a513cbce76bc9d71cb652795..8f4a91aad595ccd8138f7dccbe987170d0010eaf 100644 (file)
return("");
}
+ /* Allow readonly access, the plugin::plugin will restrict the acls */
+ if(isset($_POST['open_readonly'])) return("");
+
/* Get LDAP link, check for presence of the lock entry */
$user= "";
$ldap= $config->get_ldap_link();