* InfoLog: switching to a group-type resets access to "public" and disables access in edit

This commit is contained in:
Ralf Becker 2012-11-13 12:07:10 +00:00
parent d6ce940eb0
commit 04017a728b
2 changed files with 6 additions and 1 deletions

View File

@ -851,6 +851,7 @@ class infolog_bo
return false; // no edit rights from the group-owner and no implicit rights (delegated and sufficient rights) return false; // no edit rights from the group-owner and no implicit rights (delegated and sufficient rights)
} }
} }
$values['info_access'] = 'public'; // group-owners are allways public
} }
elseif (!$values['info_id'] && !$values['info_owner'] || $GLOBALS['egw']->accounts->get_type($values['info_owner']) == 'g') elseif (!$values['info_id'] && !$values['info_owner'] || $GLOBALS['egw']->accounts->get_type($values['info_owner']) == 'g')
{ {

View File

@ -1323,7 +1323,9 @@ else
$entry['info_type'] = $settings; $entry['info_type'] = $settings;
try { try {
$this->bo->write($entry, true,true,true,$skip_notifications,true); // Throw exceptions $this->bo->write($entry, true,true,true,$skip_notifications,true); // Throw exceptions
} catch (egw_exception_wrong_userinput $e) { }
catch (egw_exception_wrong_userinput $e)
{
$msg .= "\n".$e->getMessage(); $msg .= "\n".$e->getMessage();
$failed++; $failed++;
break; break;
@ -1946,6 +1948,8 @@ else
//echo "<p>setting type to r/o as user has no delete rights from group #$group</p>\n"; //echo "<p>setting type to r/o as user has no delete rights from group #$group</p>\n";
$readonlys['info_type'] = true; $readonlys['info_type'] = true;
} }
// disable info_access for group-owners
$readonlys['info_access'] = true;
} }
elseif($GLOBALS['egw']->accounts->get_type($content['info_owner']) == 'g') elseif($GLOBALS['egw']->accounts->get_type($content['info_owner']) == 'g')
{ {