diff --git a/phpgwapi/setup/default_records.inc.php b/phpgwapi/setup/default_records.inc.php index 45e1e49f1f..394565b285 100644 --- a/phpgwapi/setup/default_records.inc.php +++ b/phpgwapi/setup/default_records.inc.php @@ -234,3 +234,10 @@ foreach(array('','addressbook', 'calendar', 'infolog', 'tracker', 'timesheet', ' } $prefs->save_repository(false, 'default'); egw_vfs::$is_root = false; + +/** + * Create anonymous user for sharing of files + */ +$GLOBALS['egw_setup']->add_account('NoGroup', 'No', 'Rights', false, false); +$anonymous = $GLOBALS['egw_setup']->add_account('anonymous', 'SiteMgr', 'User', 'anonymous', 'NoGroup'); +$GLOBALS['egw_setup']->add_acl('phpgwapi', 'anonymous', $anonymous); diff --git a/phpgwapi/setup/tables_update.inc.php b/phpgwapi/setup/tables_update.inc.php index 9abeec373b..94b179344b 100644 --- a/phpgwapi/setup/tables_update.inc.php +++ b/phpgwapi/setup/tables_update.inc.php @@ -53,5 +53,10 @@ function phpgwapi_upgrade14_1() */ function phpgwapi_upgrade14_1_900() { + // Create anonymous user for sharing of files + $GLOBALS['egw_setup']->add_account('NoGroup', 'No', 'Rights', false, false); + $anonymous = $GLOBALS['egw_setup']->add_account('anonymous', 'SiteMgr', 'User', 'anonymous', 'NoGroup'); + $GLOBALS['egw_setup']->add_acl('phpgwapi', 'anonymous', $anonymous); + return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '14.2'; } \ No newline at end of file