diff --git a/app/devices/app_config.php b/app/devices/app_config.php index 0771edbf42..f8ecebd555 100644 --- a/app/devices/app_config.php +++ b/app/devices/app_config.php @@ -320,6 +320,9 @@ $apps[$x]['permissions'][$y]['name'] = 'device_profile_setting_all'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $y++; + $apps[$x]['permissions'][$y]['name'] = 'device_export'; + $apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; + $y++; //default settings $y = 0; diff --git a/app/devices/device_download.php b/app/devices/device_download.php index e0e492a1da..7d554c6a88 100644 --- a/app/devices/device_download.php +++ b/app/devices/device_download.php @@ -31,13 +31,13 @@ require_once "resources/paging.php"; //check permissions - if (if_group("superadmin")) { - //access granted - } - else { - echo "access denied"; - exit; - } + if (permission_exists('device_export')) { + //access granted + } + else { + echo "access denied"; + exit; + } //add multi-lingual support $language = new text; diff --git a/app/extensions/app_config.php b/app/extensions/app_config.php index b9acafc450..6d5bc96584 100644 --- a/app/extensions/app_config.php +++ b/app/extensions/app_config.php @@ -187,6 +187,9 @@ $y++; $apps[$x]['permissions'][$y]['name'] = "extension_copy"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; + $apps[$x]['permissions'][$y]['name'] = "extension_export"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; //default settings $y=0; diff --git a/app/extensions/extension_download.php b/app/extensions/extension_download.php index 16cfcf40d4..6cb2e2cfbb 100644 --- a/app/extensions/extension_download.php +++ b/app/extensions/extension_download.php @@ -31,13 +31,13 @@ require_once "resources/paging.php"; //check permissions - if (if_group("superadmin")) { - //access granted - } - else { - echo "access denied"; - exit; - } + if (permission_exists('extension_export')) { + //access granted + } + else { + echo "access denied"; + exit; + } //add multi-lingual support $language = new text;