create anonymous user with random password when installing or updating to 14.2, as it is required to be able to share files

This commit is contained in:
Ralf Becker 2015-02-04 13:15:11 +00:00
parent fffdef027e
commit cb21285443
2 changed files with 12 additions and 0 deletions

View File

@ -234,3 +234,10 @@ foreach(array('','addressbook', 'calendar', 'infolog', 'tracker', 'timesheet', '
} }
$prefs->save_repository(false, 'default'); $prefs->save_repository(false, 'default');
egw_vfs::$is_root = false; 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);

View File

@ -53,5 +53,10 @@ function phpgwapi_upgrade14_1()
*/ */
function phpgwapi_upgrade14_1_900() 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'; return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '14.2';
} }