Browse Source
Move to PSR-4
Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/5580/head
Joas Schilling
8 years ago
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
12 changed files with
66 additions and
26 deletions
-
apps/admin_audit/appinfo/app.php
-
apps/admin_audit/appinfo/info.xml
-
apps/admin_audit/lib/Actions/Action.php
-
apps/admin_audit/lib/Actions/Auth.php
-
apps/admin_audit/lib/Actions/Files.php
-
apps/admin_audit/lib/Actions/GroupManagement.php
-
apps/admin_audit/lib/Actions/Sharing.php
-
apps/admin_audit/lib/Actions/Trashbin.php
-
apps/admin_audit/lib/Actions/UserManagement.php
-
apps/admin_audit/lib/Actions/Versions.php
-
apps/admin_audit/lib/AppInfo/Application.php
-
apps/admin_audit/lib/AuditLogger.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, |
|
|
|
|
|
|
|
@ -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> |
|
|
|
|
|
|
|
@ -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; |
|
|
|
|
|
|
|
@ -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) { |
|
|
|
@ -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 { |
|
|
|
/** |
|
|
|
@ -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 { |
|
|
|
|
|
|
|
@ -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 { |
|
|
|
/** |
|
|
|
@ -21,8 +21,7 @@ |
|
|
|
* |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
namespace OCA\Admin_Audit\Actions; |
|
|
|
namespace OCA\AdminAudit\Actions; |
|
|
|
|
|
|
|
|
|
|
|
class Trashbin extends Action { |
|
|
|
@ -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 { |
|
|
|
/** |
|
|
|
@ -21,8 +21,7 @@ |
|
|
|
* |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
namespace OCA\Admin_Audit\Actions; |
|
|
|
namespace OCA\AdminAudit\Actions; |
|
|
|
|
|
|
|
|
|
|
|
class Versions extends Action { |
|
|
|
@ -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'); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -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; |