Skip to content
Snippets Groups Projects
Commit 08a26be0 authored by Peter Rotich's avatar Peter Rotich
Browse files

Installer: Extended Access to ALL Departments

Give initial Admin user extended access to ALL departments loaded on
install. This will help new osTicket users, without the Access Control knowhow, see all tickets regardless of the
department while learning the system.
parent 4a9d6b92
Branches
Tags
No related merge requests found
......@@ -210,6 +210,18 @@ class Installer extends SetupWizard {
return false;
}
// Extended Access
foreach (Dept::objects()
->filter(Q::not(array('id' => $dept_id)))
->values_flat('id') as $row) {
$da = new StaffDeptAccess(array(
'dept_id' => $row[0],
'role_id' => $role_id
));
$staff->dept_access->add($da);
}
$staff->dept_access->saveAll();
// Create default emails!
$email = $vars['email'];
list(,$domain) = explode('@', $vars['email']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment