diff --git a/apps/admin_export/settings.php b/apps/admin_export/settings.php index 565c4b3db976036778cadecf7d95d9f642c3b9c8..8308a2b89b502af9789e1de397bf446da98f917c 100644 --- a/apps/admin_export/settings.php +++ b/apps/admin_export/settings.php @@ -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 . "/"; diff --git a/apps/contacts/photo.php b/apps/contacts/photo.php index 1bdfbe3a27f0f2507b53c960685c2cd3da91562c..5178fe7a078d021e5f790fe0b263f945de11c028 100644 --- a/apps/contacts/photo.php +++ b/apps/contacts/photo.php @@ -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.'); diff --git a/settings/ajax/disableapp.php b/settings/ajax/disableapp.php index 12f6b32a4f396ac6ca734b7ec7434d56277d092c..06dd3c2ac6bfd5dc9fddc8959a10b8fd41c234b1 100644 --- a/settings/ajax/disableapp.php +++ b/settings/ajax/disableapp.php @@ -1,6 +1,7 @@ <?php // Init owncloud require_once('../../lib/base.php'); +OC_JSON::checkAdminUser(); OC_JSON::setContentTypeHeader(); OC_App::disable($_POST['appid']); diff --git a/settings/ajax/enableapp.php b/settings/ajax/enableapp.php index 8be80cd2ececdb91a2743df713b08c1c97cc6d33..639df2aecc0fad9505acdcdc12d1691d998b863a 100644 --- a/settings/ajax/enableapp.php +++ b/settings/ajax/enableapp.php @@ -2,6 +2,7 @@ // Init owncloud require_once('../../lib/base.php'); +OC_JSON::checkAdminUser(); OC_JSON::setContentTypeHeader(); OC_App::enable($_POST['appid']); diff --git a/tests/index.php b/tests/index.php index efa730f6f8f88b35883a9e5e9c5473ed48a9a38c..08e53f1a5756591bf56b1da38b158a73372ee95f 100644 --- a/tests/index.php +++ b/tests/index.php @@ -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(); @@ -74,4 +75,4 @@ function loadFiles($path,$exclude=false){ } return $results; } -?> \ No newline at end of file +?>