mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-28 08:49:00 +01:00
view now has ACL support
This commit is contained in:
parent
a4ce6380d9
commit
76495e058f
@ -11,7 +11,7 @@
|
|||||||
<TR>
|
<TR>
|
||||||
<TD align="left">
|
<TD align="left">
|
||||||
{edit_link}
|
{edit_link}
|
||||||
<input type="submit" name="edit" value="{lang_edit}">
|
{edit_button}
|
||||||
</form>
|
</form>
|
||||||
</TD>
|
</TD>
|
||||||
<TD align="left">
|
<TD align="left">
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
// First, make sure they have permission to this entry
|
// First, make sure they have permission to this entry
|
||||||
$check = addressbook_read_entry($ab_id,array('owner' => 'owner'));
|
$check = addressbook_read_entry($ab_id,array('owner' => 'owner'));
|
||||||
|
|
||||||
if (! $this->check_perms($this->grants[$check[0]['owner']],PHPGW_ACL_PRIVATE) && $check[0]['owner'] != $phpgw_info['user']['account_id'])
|
if (! $this->check_perms($this->grants[$check[0]['owner']],PHPGW_ACL_READ) && $check[0]['owner'] != $phpgw_info['user']['account_id'])
|
||||||
{
|
{
|
||||||
Header("Location: "
|
Header("Location: "
|
||||||
. $phpgw->link('/addressbook/index.php',"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query&cat_id=$cat_id"));
|
. $phpgw->link('/addressbook/index.php',"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query&cat_id=$cat_id"));
|
||||||
@ -113,10 +113,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$cat = CreateObject('phpgwapi.categories');
|
$cat = CreateObject('phpgwapi.categories');
|
||||||
$catinfo = $cat->return_single($cat_id);
|
// $catinfo = $cat->return_single($cat_id);
|
||||||
$catname = $catinfo[0]["name"];
|
$catname = $catinfo[0]["name"];
|
||||||
$cat->app_name = "phpgw";
|
$cat->app_name = "phpgw";
|
||||||
$catinfo = $cat->return_single($cat_id);
|
// $catinfo = $cat->return_single($cat_id);
|
||||||
$catname .= $catinfo[0]["name"];
|
$catname .= $catinfo[0]["name"];
|
||||||
if (!$catname) { $catname = lang('none'); }
|
if (!$catname) { $catname = lang('none'); }
|
||||||
|
|
||||||
@ -131,11 +131,11 @@
|
|||||||
|
|
||||||
$sfields = rawurlencode(serialize($fields[0]));
|
$sfields = rawurlencode(serialize($fields[0]));
|
||||||
|
|
||||||
if ($rights & PHPGW_ACL_EDIT) {
|
if ($this->grants[$record_owner] & PHPGW_ACL_EDIT || $record_owner == $phpgw_info['user']['account_id'])
|
||||||
$editlink = '<form method="POST" action="'.$phpgw->link("/addressbook/edit.php","ab_id=$ab_id&start=$start&sort=$sort&order=$order&cat_id=$cat_id"
|
{
|
||||||
. "&query=$query&sort=$sort").'">';
|
$t->set_var('edit_link','<form method="POST" action="'.$phpgw->link("/addressbook/edit.php","ab_id=$ab_id&start=$start&sort=$sort&order=$order&cat_id=$cat_id"
|
||||||
} else {
|
. "&query=$query&sort=$sort").'">');
|
||||||
$editlink = '';
|
$t->set_var('edit_button','<input type="submit" name="edit" value="' . lang('Edit') . '">');
|
||||||
}
|
}
|
||||||
|
|
||||||
$copylink = '<form method="POST" action="'
|
$copylink = '<form method="POST" action="'
|
||||||
@ -155,18 +155,15 @@
|
|||||||
$t->set_var("cols",$columns_html);
|
$t->set_var("cols",$columns_html);
|
||||||
$t->set_var("lang_ok",lang("ok"));
|
$t->set_var("lang_ok",lang("ok"));
|
||||||
$t->set_var("lang_done",lang("done"));
|
$t->set_var("lang_done",lang("done"));
|
||||||
$t->set_var("lang_edit",lang("edit"));
|
|
||||||
$t->set_var("lang_copy",lang("copy"));
|
$t->set_var("lang_copy",lang("copy"));
|
||||||
$t->set_var("copy_fields",$sfields);
|
$t->set_var("copy_fields",$sfields);
|
||||||
$t->set_var("lang_submit",lang("submit"));
|
$t->set_var("lang_submit",lang("submit"));
|
||||||
$t->set_var("lang_vcard",lang("vcard"));
|
$t->set_var("lang_vcard",lang("vcard"));
|
||||||
$t->set_var("done_link",$donelink);
|
$t->set_var("done_link",$donelink);
|
||||||
$t->set_var("edit_link",$editlink);
|
|
||||||
$t->set_var("copy_link",$copylink);
|
$t->set_var("copy_link",$copylink);
|
||||||
$t->set_var("vcard_link",$vcardlink);
|
$t->set_var("vcard_link",$vcardlink);
|
||||||
|
|
||||||
$t->parse("out","view");
|
$t->pfp("out","view");
|
||||||
$t->pparse("out","view");
|
|
||||||
|
|
||||||
$phpgw->common->phpgw_footer();
|
$phpgw->common->phpgw_footer();
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user