routes.php 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <?php
  2. /**
  3. * Copyright (c) 2012 Bart Visscher <bartv@thisnet.nl>
  4. * This file is licensed under the Affero General Public License version 3 or
  5. * later.
  6. * See the COPYING-README file.
  7. */
  8. namespace OC\Settings;
  9. $application = new Application();
  10. $application->registerRoutes($this, array('routes' =>array(
  11. array('name' => 'MailSettings#setMailSettings', 'url' => '/settings/admin/mailsettings', 'verb' => 'POST'),
  12. array('name' => 'MailSettings#storeCredentials', 'url' => '/settings/admin/mailsettings/credentials', 'verb' => 'POST'),
  13. array('name' => 'MailSettings#sendTestMail', 'url' => '/settings/admin/mailtest', 'verb' => 'POST'),
  14. array('name' => 'AppSettings#listCategories', 'url' => '/settings/apps/categories', 'verb' => 'GET'),
  15. array('name' => 'AppSettings#listApps', 'url' => '/settings/apps/list', 'verb' => 'GET'),
  16. array('name' => 'SecuritySettings#enforceSSL', 'url' => '/settings/admin/security/ssl', 'verb' => 'POST'),
  17. array('name' => 'SecuritySettings#enforceSSLForSubdomains', 'url' => '/settings/admin/security/ssl/subdomains', 'verb' => 'POST'),
  18. array('name' => 'SecuritySettings#trustedDomains', 'url' => '/settings/admin/security/trustedDomains', 'verb' => 'POST'),
  19. )));
  20. /** @var $this \OCP\Route\IRouter */
  21. // Settings pages
  22. $this->create('settings_help', '/settings/help')
  23. ->actionInclude('settings/help.php');
  24. $this->create('settings_personal', '/settings/personal')
  25. ->actionInclude('settings/personal.php');
  26. $this->create('settings_settings', '/settings')
  27. ->actionInclude('settings/settings.php');
  28. $this->create('settings_users', '/settings/users')
  29. ->actionInclude('settings/users.php');
  30. $this->create('settings_apps', '/settings/apps')
  31. ->actionInclude('settings/apps.php');
  32. $this->create('settings_admin', '/settings/admin')
  33. ->actionInclude('settings/admin.php');
  34. // Settings ajax actions
  35. // users
  36. $this->create('settings_ajax_userlist', '/settings/ajax/userlist')
  37. ->actionInclude('settings/ajax/userlist.php');
  38. $this->create('settings_ajax_grouplist', '/settings/ajax/grouplist')
  39. ->actionInclude('settings/ajax/grouplist.php');
  40. $this->create('settings_ajax_everyonecount', '/settings/ajax/geteveryonecount')
  41. ->actionInclude('settings/ajax/geteveryonecount.php');
  42. $this->create('settings_ajax_createuser', '/settings/ajax/createuser.php')
  43. ->actionInclude('settings/ajax/createuser.php');
  44. $this->create('settings_ajax_removeuser', '/settings/ajax/removeuser.php')
  45. ->actionInclude('settings/ajax/removeuser.php');
  46. $this->create('settings_ajax_setquota', '/settings/ajax/setquota.php')
  47. ->actionInclude('settings/ajax/setquota.php');
  48. $this->create('settings_ajax_creategroup', '/settings/ajax/creategroup.php')
  49. ->actionInclude('settings/ajax/creategroup.php');
  50. $this->create('settings_ajax_togglegroups', '/settings/ajax/togglegroups.php')
  51. ->actionInclude('settings/ajax/togglegroups.php');
  52. $this->create('settings_ajax_togglesubadmins', '/settings/ajax/togglesubadmins.php')
  53. ->actionInclude('settings/ajax/togglesubadmins.php');
  54. $this->create('settings_ajax_removegroup', '/settings/ajax/removegroup.php')
  55. ->actionInclude('settings/ajax/removegroup.php');
  56. $this->create('settings_users_changepassword', '/settings/users/changepassword')
  57. ->post()
  58. ->action('OC\Settings\ChangePassword\Controller', 'changeUserPassword');
  59. $this->create('settings_ajax_changedisplayname', '/settings/ajax/changedisplayname.php')
  60. ->actionInclude('settings/ajax/changedisplayname.php');
  61. $this->create('settings_ajax_changegorupname', '/settings/ajax/changegroupname.php')
  62. ->actionInclude('settings/ajax/changegroupname.php');
  63. // personal
  64. $this->create('settings_personal_changepassword', '/settings/personal/changepassword')
  65. ->post()
  66. ->action('OC\Settings\ChangePassword\Controller', 'changePersonalPassword');
  67. $this->create('settings_ajax_lostpassword', '/settings/ajax/lostpassword.php')
  68. ->actionInclude('settings/ajax/lostpassword.php');
  69. $this->create('settings_ajax_setlanguage', '/settings/ajax/setlanguage.php')
  70. ->actionInclude('settings/ajax/setlanguage.php');
  71. $this->create('settings_ajax_decryptall', '/settings/ajax/decryptall.php')
  72. ->actionInclude('settings/ajax/decryptall.php');
  73. $this->create('settings_ajax_restorekeys', '/settings/ajax/restorekeys.php')
  74. ->actionInclude('settings/ajax/restorekeys.php');
  75. $this->create('settings_ajax_deletekeys', '/settings/ajax/deletekeys.php')
  76. ->actionInclude('settings/ajax/deletekeys.php');
  77. $this->create('settings_cert_post', '/settings/ajax/addRootCertificate')
  78. ->actionInclude('settings/ajax/addRootCertificate.php');
  79. $this->create('settings_cert_remove', '/settings/ajax/removeRootCertificate')
  80. ->actionInclude('settings/ajax/removeRootCertificate.php');
  81. // apps
  82. $this->create('settings_ajax_enableapp', '/settings/ajax/enableapp.php')
  83. ->actionInclude('settings/ajax/enableapp.php');
  84. $this->create('settings_ajax_disableapp', '/settings/ajax/disableapp.php')
  85. ->actionInclude('settings/ajax/disableapp.php');
  86. $this->create('settings_ajax_updateapp', '/settings/ajax/updateapp.php')
  87. ->actionInclude('settings/ajax/updateapp.php');
  88. $this->create('settings_ajax_uninstallapp', '/settings/ajax/uninstallapp.php')
  89. ->actionInclude('settings/ajax/uninstallapp.php');
  90. $this->create('settings_ajax_navigationdetect', '/settings/ajax/navigationdetect.php')
  91. ->actionInclude('settings/ajax/navigationdetect.php');
  92. // admin
  93. $this->create('settings_ajax_getlog', '/settings/ajax/getlog.php')
  94. ->actionInclude('settings/ajax/getlog.php');
  95. $this->create('settings_ajax_setloglevel', '/settings/ajax/setloglevel.php')
  96. ->actionInclude('settings/ajax/setloglevel.php');
  97. $this->create('settings_ajax_excludegroups', '/settings/ajax/excludegroups.php')
  98. ->actionInclude('settings/ajax/excludegroups.php');
  99. $this->create('settings_ajax_checksetup', '/settings/ajax/checksetup')
  100. ->actionInclude('settings/ajax/checksetup.php');