forked from extern/egroupware
- fixed typo calling not existing check_acl instead of check_acl_invite
- fixed check_acl_invite to work with no acl set too
This commit is contained in:
parent
d91933ac5f
commit
9726ed19fc
@ -323,7 +323,7 @@ class calendar_boupdate extends calendar_bo
|
|||||||
$removed[] = $uid;
|
$removed[] = $uid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo "<p>".__METHOD__."($event[title],".($old_event?'$old_event':'NULL').") returning ".array2string($removed)."</p>";
|
//echo "<p>".__METHOD__."($event[title],".($old_event?'$old_event':'NULL').") returning ".array2string($removed)."</p>";
|
||||||
return $removed;
|
return $removed;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -336,12 +336,21 @@ class calendar_boupdate extends calendar_bo
|
|||||||
public function check_acl_invite($uid)
|
public function check_acl_invite($uid)
|
||||||
{
|
{
|
||||||
if (!is_numeric($uid)) return true; // nothing implemented for resources so far
|
if (!is_numeric($uid)) return true; // nothing implemented for resources so far
|
||||||
|
|
||||||
if ($this->require_acl_invite == 'group' && $GLOBALS['egw']->accounts->get_type($uid) != 'g')
|
if (!$this->require_acl_invite)
|
||||||
{
|
{
|
||||||
return true; // grant only required for groups
|
$ret = true; // no grant required
|
||||||
}
|
}
|
||||||
return $this->check_perms(EGW_ACL_INVITE,0,$uid);
|
elseif ($this->require_acl_invite == 'group' && $GLOBALS['egw']->accounts->get_type($uid) != 'g')
|
||||||
|
{
|
||||||
|
$ret = true; // grant only required for groups
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$ret = $this->check_perms(EGW_ACL_INVITE,0,$uid);
|
||||||
|
}
|
||||||
|
//error_log(__METHOD__."($uid) = ".array2string($ret));
|
||||||
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -292,7 +292,7 @@ class calendar_uiforms extends calendar_ui
|
|||||||
foreach($this->bo->resources as $type => $data) if ($data['app'] == $app) break;
|
foreach($this->bo->resources as $type => $data) if ($data['app'] == $app) break;
|
||||||
$uid = $this->bo->resources[$type]['app'] == $app ? $type.$id : false;
|
$uid = $this->bo->resources[$type]['app'] == $app ? $type.$id : false;
|
||||||
// check if new entry is no account (or contact entry of an account)
|
// check if new entry is no account (or contact entry of an account)
|
||||||
if ($app != 'addressbook' || !($data = $GLOBALS['egw']->accounts->name2id($id,'person_id')) || !$this->bo->check_acl($data))
|
if ($app != 'addressbook' || !($data = $GLOBALS['egw']->accounts->name2id($id,'person_id')) || !$this->bo->check_acl_invite($data))
|
||||||
{
|
{
|
||||||
if ($uid && $id)
|
if ($uid && $id)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user