2012-09-29 20:08:54 +04:00
|
|
|
<?php
|
|
|
|
/**
|
2015-03-26 13:44:34 +03:00
|
|
|
* @author Bart Visscher <bartv@thisnet.nl>
|
|
|
|
* @author Björn Schießle <schiessle@owncloud.com>
|
|
|
|
* @author Christopher Schäpers <kondou@ts.unde.re>
|
|
|
|
* @author Clark Tomlinson <fallen013@gmail.com>
|
|
|
|
* @author Frank Karlitschek <frank@owncloud.org>
|
|
|
|
* @author Georg Ehrke <georg@owncloud.com>
|
|
|
|
* @author Lukas Reschke <lukas@owncloud.com>
|
|
|
|
* @author Morris Jobke <hey@morrisjobke.de>
|
|
|
|
* @author Raghu Nayyar <me@iraghu.com>
|
|
|
|
* @author Robin Appelman <icewind@owncloud.com>
|
|
|
|
* @author Thomas Müller <thomas.mueller@tmit.eu>
|
|
|
|
* @author Vincent Petry <pvince81@owncloud.com>
|
|
|
|
*
|
|
|
|
* @copyright Copyright (c) 2015, ownCloud, Inc.
|
|
|
|
* @license AGPL-3.0
|
|
|
|
*
|
|
|
|
* This code is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
|
|
* as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License, version 3,
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
|
|
*
|
2012-09-29 20:08:54 +04:00
|
|
|
*/
|
2015-02-26 13:37:37 +03:00
|
|
|
|
2014-10-03 17:14:22 +04:00
|
|
|
namespace OC\Settings;
|
|
|
|
|
|
|
|
$application = new Application();
|
2015-03-30 16:58:20 +03:00
|
|
|
$application->registerRoutes($this, [
|
|
|
|
'resources' => [
|
|
|
|
'groups' => ['url' => '/settings/users/groups'],
|
|
|
|
'users' => ['url' => '/settings/users/users']
|
|
|
|
],
|
|
|
|
'routes' => [
|
|
|
|
['name' => 'MailSettings#setMailSettings', 'url' => '/settings/admin/mailsettings', 'verb' => 'POST'],
|
|
|
|
['name' => 'MailSettings#storeCredentials', 'url' => '/settings/admin/mailsettings/credentials', 'verb' => 'POST'],
|
|
|
|
['name' => 'MailSettings#sendTestMail', 'url' => '/settings/admin/mailtest', 'verb' => 'POST'],
|
2015-04-09 17:07:15 +03:00
|
|
|
['name' => 'Encryption#startMigration', 'url' => '/settings/admin/startmigration', 'verb' => 'POST'],
|
2015-03-30 16:58:20 +03:00
|
|
|
['name' => 'AppSettings#listCategories', 'url' => '/settings/apps/categories', 'verb' => 'GET'],
|
|
|
|
['name' => 'AppSettings#viewApps', 'url' => '/settings/apps', 'verb' => 'GET'],
|
|
|
|
['name' => 'AppSettings#listApps', 'url' => '/settings/apps/list', 'verb' => 'GET'],
|
|
|
|
['name' => 'AppSettings#changeExperimentalConfigState', 'url' => '/settings/apps/experimental', 'verb' => 'POST'],
|
|
|
|
['name' => 'SecuritySettings#trustedDomains', 'url' => '/settings/admin/security/trustedDomains', 'verb' => 'POST'],
|
|
|
|
['name' => 'Users#setMailAddress', 'url' => '/settings/users/{id}/mailAddress', 'verb' => 'PUT'],
|
|
|
|
['name' => 'LogSettings#setLogLevel', 'url' => '/settings/admin/log/level', 'verb' => 'POST'],
|
|
|
|
['name' => 'LogSettings#getEntries', 'url' => '/settings/admin/log/entries', 'verb' => 'GET'],
|
|
|
|
['name' => 'LogSettings#download', 'url' => '/settings/admin/log/download', 'verb' => 'GET'],
|
2015-03-26 16:51:33 +03:00
|
|
|
['name' => 'CheckSetup#check', 'url' => '/settings/ajax/checksetup', 'verb' => 'GET'],
|
2015-03-30 16:58:20 +03:00
|
|
|
]
|
|
|
|
]);
|
2014-10-03 17:14:22 +04:00
|
|
|
|
|
|
|
/** @var $this \OCP\Route\IRouter */
|
2014-03-03 01:30:24 +04:00
|
|
|
|
2012-09-29 20:08:54 +04:00
|
|
|
// Settings pages
|
|
|
|
$this->create('settings_help', '/settings/help')
|
|
|
|
->actionInclude('settings/help.php');
|
|
|
|
$this->create('settings_personal', '/settings/personal')
|
|
|
|
->actionInclude('settings/personal.php');
|
|
|
|
$this->create('settings_users', '/settings/users')
|
|
|
|
->actionInclude('settings/users.php');
|
|
|
|
$this->create('settings_admin', '/settings/admin')
|
|
|
|
->actionInclude('settings/admin.php');
|
|
|
|
// Settings ajax actions
|
|
|
|
// users
|
2014-08-29 19:27:23 +04:00
|
|
|
$this->create('settings_ajax_everyonecount', '/settings/ajax/geteveryonecount')
|
|
|
|
->actionInclude('settings/ajax/geteveryonecount.php');
|
2012-09-29 20:08:54 +04:00
|
|
|
$this->create('settings_ajax_setquota', '/settings/ajax/setquota.php')
|
|
|
|
->actionInclude('settings/ajax/setquota.php');
|
|
|
|
$this->create('settings_ajax_togglegroups', '/settings/ajax/togglegroups.php')
|
|
|
|
->actionInclude('settings/ajax/togglegroups.php');
|
|
|
|
$this->create('settings_ajax_togglesubadmins', '/settings/ajax/togglesubadmins.php')
|
|
|
|
->actionInclude('settings/ajax/togglesubadmins.php');
|
2013-09-13 19:07:23 +04:00
|
|
|
$this->create('settings_users_changepassword', '/settings/users/changepassword')
|
2013-09-11 18:35:13 +04:00
|
|
|
->post()
|
|
|
|
->action('OC\Settings\ChangePassword\Controller', 'changeUserPassword');
|
2013-02-22 20:21:57 +04:00
|
|
|
$this->create('settings_ajax_changedisplayname', '/settings/ajax/changedisplayname.php')
|
2013-02-15 02:29:51 +04:00
|
|
|
->actionInclude('settings/ajax/changedisplayname.php');
|
2014-02-18 20:29:45 +04:00
|
|
|
$this->create('settings_ajax_changegorupname', '/settings/ajax/changegroupname.php')
|
|
|
|
->actionInclude('settings/ajax/changegroupname.php');
|
2013-09-11 18:35:13 +04:00
|
|
|
// personal
|
2013-09-13 19:07:23 +04:00
|
|
|
$this->create('settings_personal_changepassword', '/settings/personal/changepassword')
|
2013-09-11 18:35:13 +04:00
|
|
|
->post()
|
|
|
|
->action('OC\Settings\ChangePassword\Controller', 'changePersonalPassword');
|
2012-09-29 20:08:54 +04:00
|
|
|
$this->create('settings_ajax_setlanguage', '/settings/ajax/setlanguage.php')
|
|
|
|
->actionInclude('settings/ajax/setlanguage.php');
|
2014-08-21 16:15:43 +04:00
|
|
|
$this->create('settings_cert_post', '/settings/ajax/addRootCertificate')
|
2014-08-15 19:18:46 +04:00
|
|
|
->actionInclude('settings/ajax/addRootCertificate.php');
|
2014-08-21 16:15:43 +04:00
|
|
|
$this->create('settings_cert_remove', '/settings/ajax/removeRootCertificate')
|
2014-08-15 19:18:46 +04:00
|
|
|
->actionInclude('settings/ajax/removeRootCertificate.php');
|
2012-09-29 20:08:54 +04:00
|
|
|
// apps
|
|
|
|
$this->create('settings_ajax_enableapp', '/settings/ajax/enableapp.php')
|
|
|
|
->actionInclude('settings/ajax/enableapp.php');
|
|
|
|
$this->create('settings_ajax_disableapp', '/settings/ajax/disableapp.php')
|
|
|
|
->actionInclude('settings/ajax/disableapp.php');
|
2013-01-21 23:40:23 +04:00
|
|
|
$this->create('settings_ajax_updateapp', '/settings/ajax/updateapp.php')
|
|
|
|
->actionInclude('settings/ajax/updateapp.php');
|
2014-05-31 19:50:39 +04:00
|
|
|
$this->create('settings_ajax_uninstallapp', '/settings/ajax/uninstallapp.php')
|
|
|
|
->actionInclude('settings/ajax/uninstallapp.php');
|
2012-10-28 21:52:18 +04:00
|
|
|
$this->create('settings_ajax_navigationdetect', '/settings/ajax/navigationdetect.php')
|
|
|
|
->actionInclude('settings/ajax/navigationdetect.php');
|
2012-09-29 20:08:54 +04:00
|
|
|
// admin
|
2014-05-13 17:22:18 +04:00
|
|
|
$this->create('settings_ajax_excludegroups', '/settings/ajax/excludegroups.php')
|
|
|
|
->actionInclude('settings/ajax/excludegroups.php');
|