Browse Source

Move to PSR-4

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/5580/head
Joas Schilling 8 years ago
parent
commit
8260d4bf73
No known key found for this signature in database GPG Key ID: E166FD8976B3BAC8
  1. 5
      apps/admin_audit/appinfo/app.php
  2. 1
      apps/admin_audit/appinfo/info.xml
  3. 3
      apps/admin_audit/lib/Actions/Action.php
  4. 5
      apps/admin_audit/lib/Actions/Auth.php
  5. 5
      apps/admin_audit/lib/Actions/Files.php
  6. 6
      apps/admin_audit/lib/Actions/GroupManagement.php
  7. 7
      apps/admin_audit/lib/Actions/Sharing.php
  8. 3
      apps/admin_audit/lib/Actions/Trashbin.php
  9. 7
      apps/admin_audit/lib/Actions/UserManagement.php
  10. 3
      apps/admin_audit/lib/Actions/Versions.php
  11. 31
      apps/admin_audit/lib/AppInfo/Application.php
  12. 16
      apps/admin_audit/lib/AuditLogger.php

5
apps/admin_audit/appinfo/app.php

@ -23,12 +23,15 @@
*
*/
$app = new \OCA\AdminAudit\AppInfo\Application();
$logger = \OC::$server->getLogger();
$userSession = \OC::$server->getUserSession();
$groupManager = \OC::$server->getGroupManager();
$eventDispatcher = \OC::$server->getEventDispatcher();
$auditLogger = new \OCA\Admin_Audit\AuditLogger(
$auditLogger = new \OCA\AdminAudit\AuditLogger(
$logger,
$userSession,
$groupManager,

1
apps/admin_audit/appinfo/info.xml

@ -6,6 +6,7 @@
<licence>AGPL</licence>
<author>Nextcloud</author>
<version>1.3.0</version>
<namespace>AdminAudit</namespace>
<dependencies>
<nextcloud min-version="13" max-version="13" />
</dependencies>

3
apps/admin_audit/lib/actions/action.php → apps/admin_audit/lib/Actions/Action.php

@ -20,7 +20,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\Admin_Audit\Actions;
namespace OCA\AdminAudit\Actions;
use OCP\ILogger;

5
apps/admin_audit/lib/actions/auth.php → apps/admin_audit/lib/Actions/Auth.php

@ -20,12 +20,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\Admin_Audit\Actions;
namespace OCA\AdminAudit\Actions;
/**
* Class Auth logs all auth related actions
*
* @package OCA\Admin_Audit\Actions
* @package OCA\AdminAudit\Actions
*/
class Auth extends Action {
public function loginAttempt(array $params) {

5
apps/admin_audit/lib/actions/files.php → apps/admin_audit/lib/Actions/Files.php

@ -20,12 +20,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\Admin_Audit\Actions;
namespace OCA\AdminAudit\Actions;
/**
* Class Files logs the actions to files
*
* @package OCA\Admin_Audit\Actions
* @package OCA\AdminAudit\Actions
*/
class Files extends Action {
/**

6
apps/admin_audit/lib/actions/groupmanagement.php → apps/admin_audit/lib/Actions/GroupManagement.php

@ -23,18 +23,16 @@
*
*/
namespace OCA\AdminAudit\Actions;
namespace OCA\Admin_Audit\Actions;
use OCA\Admin_Audit\Actions\Action;
use OCP\IGroup;
use OCP\IUser;
/**
* Class GroupManagement logs all group manager related events
*
* @package OCA\Admin_Audit
* @package OCA\AdminAudit\Actions
*/
class GroupManagement extends Action {

7
apps/admin_audit/lib/actions/sharing.php → apps/admin_audit/lib/Actions/Sharing.php

@ -20,13 +20,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\Admin_Audit\Actions;
namespace OCA\AdminAudit\Actions;
use OCP\Share;
/**
* Class Sharing logs the sharing actions
*
* @package OCA\Admin_Audit\Actions
* @package OCA\AdminAudit\Actions
*/
class Sharing extends Action {
/**

3
apps/admin_audit/lib/actions/trashbin.php → apps/admin_audit/lib/Actions/Trashbin.php

@ -21,8 +21,7 @@
*
*/
namespace OCA\Admin_Audit\Actions;
namespace OCA\AdminAudit\Actions;
class Trashbin extends Action {

7
apps/admin_audit/lib/actions/usermanagement.php → apps/admin_audit/lib/Actions/UserManagement.php

@ -21,13 +21,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\Admin_Audit\Actions;
namespace OCA\AdminAudit\Actions;
use OCP\IUser;
/**
* Class UserManagement logs all user management related actions.
*
* @package OCA\Admin_Audit\Actions
* @package OCA\AdminAudit\Actions
*/
class UserManagement extends Action {
/**

3
apps/admin_audit/lib/actions/versions.php → apps/admin_audit/lib/Actions/Versions.php

@ -21,8 +21,7 @@
*
*/
namespace OCA\Admin_Audit\Actions;
namespace OCA\AdminAudit\Actions;
class Versions extends Action {

31
apps/admin_audit/lib/AppInfo/Application.php

@ -0,0 +1,31 @@
<?php
/**
* @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* 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
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\AdminAudit\AppInfo;
use OCP\AppFramework\App;
class Application extends App {
public function __construct() {
parent::__construct('admin_audit');
}
}

16
apps/admin_audit/lib/auditlogger.php → apps/admin_audit/lib/AuditLogger.php

@ -24,17 +24,17 @@
*
*/
namespace OCA\Admin_Audit;
namespace OCA\AdminAudit;
use OC\Files\Filesystem;
use OC\Files\Node\File;
use OCA\Admin_Audit\Actions\Auth;
use OCA\Admin_Audit\Actions\Files;
use OCA\Admin_Audit\Actions\GroupManagement;
use OCA\Admin_Audit\Actions\Sharing;
use OCA\Admin_Audit\Actions\Trashbin;
use OCA\Admin_Audit\Actions\UserManagement;
use OCA\Admin_Audit\Actions\Versions;
use OCA\AdminAudit\Actions\Auth;
use OCA\AdminAudit\Actions\Files;
use OCA\AdminAudit\Actions\GroupManagement;
use OCA\AdminAudit\Actions\Sharing;
use OCA\AdminAudit\Actions\Trashbin;
use OCA\AdminAudit\Actions\UserManagement;
use OCA\AdminAudit\Actions\Versions;
use OCP\IGroupManager;
use OCP\ILogger;
use OCP\IPreview;
Loading…
Cancel
Save