mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Add temporary software_add and software_edit permissions
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2019
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2020
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -45,12 +45,23 @@ if ($domains_processed == 1) {
|
||||
$array['software'][0]['software_uuid'] = '7de057e7-333b-4ebf-9466-315ae7d44efd';
|
||||
$array['software'][0]['software_version'] = software::version();
|
||||
}
|
||||
|
||||
//add the temporary permission
|
||||
$p = new permissions;
|
||||
$p->add("software_add", 'temp');
|
||||
$p->add("software_edit", 'temp');
|
||||
|
||||
//save the data
|
||||
$database = new database;
|
||||
$database->app_name = 'software';
|
||||
$database->app_uuid = 'b88c795f-7dea-4fc8-9ab7-edd555242cff';
|
||||
$database->save($array);
|
||||
unset($array);
|
||||
|
||||
//remove the temporary permission
|
||||
$p->delete("software_add", 'temp');
|
||||
$p->delete("software_edit", 'temp');
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user