Skip to content
Snippets Groups Projects
Commit 9a5d517e authored by Bart Visscher's avatar Bart Visscher
Browse files

Add more checks for admin user

parent f4782a76
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
OC_Util::checkAdminUser();
OC_Util::checkAppEnabled('admin_export');
if (isset($_POST['admin_export'])) {
$root = OC::$SERVERROOT . "/";
......
......@@ -22,19 +22,13 @@
// Init owncloud
require_once('../../lib/base.php');
OC_Util::checkLoggedIn();
OC_Util::checkAppEnabled('contacts');
$id = $_GET['id'];
$l10n = new OC_L10N('contacts');
// Check if we are a user
if( !OC_User::isLoggedIn()){
echo $l10n->t('You need to log in.');
exit();
}
$card = OC_Contacts_VCard::find( $id );
if( $card === false ){
echo $l10n->t('Contact could not be found.');
......
<?php
// Init owncloud
require_once('../../lib/base.php');
OC_JSON::checkAdminUser();
OC_JSON::setContentTypeHeader();
OC_App::disable($_POST['appid']);
......
......@@ -2,6 +2,7 @@
// Init owncloud
require_once('../../lib/base.php');
OC_JSON::checkAdminUser();
OC_JSON::setContentTypeHeader();
OC_App::enable($_POST['appid']);
......
......@@ -26,6 +26,7 @@
*/
$RUNTIME_NOSETUPFS=true;
require_once('../lib/base.php');
OC_Util::checkAdminUser();
$testCases=loadFiles(__DIR__,array('index.php','templates'));
ob_end_clean();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment