AppManagement.php 851 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCA\AdminAudit\Actions;
  8. class AppManagement extends Action {
  9. /**
  10. * @param string $appName
  11. */
  12. public function enableApp(string $appName): void {
  13. $this->log('App "%s" enabled',
  14. ['app' => $appName],
  15. ['app']
  16. );
  17. }
  18. /**
  19. * @param string $appName
  20. * @param string[] $groups
  21. */
  22. public function enableAppForGroups(string $appName, array $groups): void {
  23. $this->log('App "%1$s" enabled for groups: %2$s',
  24. ['app' => $appName, 'groups' => implode(', ', $groups)],
  25. ['app', 'groups']
  26. );
  27. }
  28. /**
  29. * @param string $appName
  30. */
  31. public function disableApp(string $appName): void {
  32. $this->log('App "%s" disabled',
  33. ['app' => $appName],
  34. ['app']
  35. );
  36. }
  37. }