From 22ae6828237a516b1cd36a3dad623b8046dfd76a Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Wed, 22 May 2019 10:48:51 +0200 Subject: Make it possible to show admin settings for sub admins Signed-off-by: Christoph Wurst --- lib/public/Settings/IManager.php | 3 ++- lib/public/Settings/ISubAdminSettings.php | 35 +++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 lib/public/Settings/ISubAdminSettings.php (limited to 'lib/public/Settings') diff --git a/lib/public/Settings/IManager.php b/lib/public/Settings/IManager.php index 52f12c3a8fb..c0a34f4403f 100644 --- a/lib/public/Settings/IManager.php +++ b/lib/public/Settings/IManager.php @@ -82,10 +82,11 @@ interface IManager { * returns a list of the admin settings * * @param string $section the section id for which to load the settings + * @param bool $subAdminOnly only return settings sub admins are supposed to see (since 17.0.0) * @return array array of IAdmin[] where key is the priority * @since 9.1.0 */ - public function getAdminSettings($section): array; + public function getAdminSettings($section, bool $subAdminOnly = false): array; /** * returns a list of the personal settings diff --git a/lib/public/Settings/ISubAdminSettings.php b/lib/public/Settings/ISubAdminSettings.php new file mode 100644 index 00000000000..3d047d2c872 --- /dev/null +++ b/lib/public/Settings/ISubAdminSettings.php @@ -0,0 +1,35 @@ + + * + * @author 2019 Christoph Wurst + * + * @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 . + */ + +namespace OCP\Settings; + +/** + * Tagging interface for settings that should be shown to sub admins + * + * @since 17.0.0 + */ +interface ISubAdminSettings extends ISettings { + +} -- cgit v1.2.3