diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-05-22 11:48:51 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-05-23 21:31:40 +0300 |
commit | 22ae6828237a516b1cd36a3dad623b8046dfd76a (patch) | |
tree | c00361d0747e295f98e1e089114b8bf48bcc0e57 /lib/public/Settings | |
parent | 09974ae92d6f3bc20143dab43baef9fc75139585 (diff) |
Make it possible to show admin settings for sub admins
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/public/Settings')
-rw-r--r-- | lib/public/Settings/IManager.php | 3 | ||||
-rw-r--r-- | lib/public/Settings/ISubAdminSettings.php | 35 |
2 files changed, 37 insertions, 1 deletions
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 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @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 OCP\Settings; + +/** + * Tagging interface for settings that should be shown to sub admins + * + * @since 17.0.0 + */ +interface ISubAdminSettings extends ISettings { + +} |