2016-12-13 10:30:08 +01:00
|
|
|
<?php
|
|
|
|
/**
|
2024-06-03 10:23:34 +02:00
|
|
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2016-12-13 10:30:08 +01:00
|
|
|
*/
|
2019-09-17 16:33:27 +02:00
|
|
|
namespace OCA\Settings\Activity;
|
2016-12-13 10:30:08 +01:00
|
|
|
|
|
|
|
use OCP\Activity\IFilter;
|
|
|
|
use OCP\IL10N;
|
|
|
|
use OCP\IURLGenerator;
|
|
|
|
|
2017-05-16 09:37:21 +02:00
|
|
|
class SecurityFilter implements IFilter {
|
2016-12-13 10:30:08 +01:00
|
|
|
|
|
|
|
/** @var IURLGenerator */
|
|
|
|
private $urlGenerator;
|
|
|
|
|
|
|
|
/** @var IL10N */
|
|
|
|
private $l10n;
|
|
|
|
|
|
|
|
public function __construct(IURLGenerator $urlGenerator, IL10N $l10n) {
|
|
|
|
$this->urlGenerator = $urlGenerator;
|
|
|
|
$this->l10n = $l10n;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function allowedApps() {
|
2016-12-13 15:15:14 +01:00
|
|
|
return [];
|
2016-12-13 10:30:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function filterTypes(array $types) {
|
2017-05-16 09:37:21 +02:00
|
|
|
return array_intersect(['security'], $types);
|
2016-12-13 10:30:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getIcon() {
|
|
|
|
return $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/password.svg'));
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getIdentifier() {
|
2017-05-16 09:37:21 +02:00
|
|
|
return 'security';
|
2016-12-13 10:30:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getName() {
|
2017-05-16 09:37:21 +02:00
|
|
|
return $this->l10n->t('Security');
|
2016-12-13 10:30:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getPriority() {
|
|
|
|
return 30;
|
|
|
|
}
|
|
|
|
}
|