mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 09:04:53 +01:00
GNU Patch #246.
This commit is contained in:
parent
0ee5082b97
commit
53344baf01
@ -331,14 +331,23 @@
|
||||
|
||||
if (!$default_acls)
|
||||
{
|
||||
$apps = Array(
|
||||
'addressbook',
|
||||
'calendar',
|
||||
'email',
|
||||
'notes',
|
||||
'todo',
|
||||
'phpwebhosting',
|
||||
'manual'
|
||||
);
|
||||
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights)values('preferences', 'changepassword', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('phpgw_group', '1', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('addressbook', 'run', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('filemanager', 'run', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('calendar', 'run', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('email', 'run', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('notes', 'run', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('todo', 'run', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
@reset($apps);
|
||||
while(list($key,$app) = each($apps))
|
||||
{
|
||||
$this->db->query("INSERT INTO phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES ('".$app."', 'run', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
}
|
||||
}
|
||||
$this->db->transaction_commit();
|
||||
return $accountid;
|
||||
|
@ -740,6 +740,16 @@
|
||||
$this->db->transaction_begin();
|
||||
if($default_acls == False)
|
||||
{
|
||||
$apps = Array(
|
||||
'addressbook',
|
||||
'calendar',
|
||||
'email',
|
||||
'notes',
|
||||
'todo',
|
||||
'phpwebhosting',
|
||||
'manual'
|
||||
);
|
||||
|
||||
$default_group_lid = $GLOBALS['phpgw_info']['server']['default_group_lid'];
|
||||
$default_group_id = $this->name2id($default_group_lid);
|
||||
$defaultgroupid = $default_group_id ? $default_group_id : $this->name2id('Default');
|
||||
@ -749,12 +759,11 @@
|
||||
. $defaultgroupid . ", " . $accountid . ", 1)",__LINE__,__FILE__);
|
||||
}
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights)values('preferences', 'changepassword', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('addressbook', 'run', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('filemanager', 'run', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('calendar', 'run', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('email', 'run', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('notes', 'run', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('todo', 'run', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
@reset($apps);
|
||||
while(list($key,$app) = each($apps))
|
||||
{
|
||||
$this->db->query("INSERT INTO phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES ('".$app."', 'run', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
}
|
||||
}
|
||||
$this->db->transaction_commit();
|
||||
return $accountid;
|
||||
|
@ -357,12 +357,22 @@
|
||||
// If they dont have a default group, they need some sort of permissions.
|
||||
// This generally doesn't / shouldn't happen, but will (jengo)
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('preferences', 'changepassword', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('addressbook', 'run', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('filemanager', 'run', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('calendar', 'run', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('email', 'run', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('notes', 'run', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
$this->db->query("insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) values('todo', 'run', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
|
||||
$apps = Array(
|
||||
'addressbook',
|
||||
'calendar',
|
||||
'email',
|
||||
'notes',
|
||||
'todo',
|
||||
'phpwebhosting',
|
||||
'manual'
|
||||
);
|
||||
|
||||
@reset($apps);
|
||||
while(list($key,$app) = each($apps))
|
||||
{
|
||||
$this->db->query("INSERT INTO phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES ('".$app."', 'run', ".$accountid.", 1)",__LINE__,__FILE__);
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->db->transaction_commit();
|
||||
|
Loading…
Reference in New Issue
Block a user