diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-05-19 18:15:41 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-05-19 18:15:41 +0200 |
commit | 4f4d777767ae254a6ce7eff07f9a404e3acc0f65 (patch) | |
tree | 78ff19f17545cc39b9a6fa5242a3dfdcd5b31a18 /apps/settings/lib | |
parent | eb720b9726aebc20ab0ed19e39ebf9c1c01ec80e (diff) | |
download | nextcloud-server-4f4d777767ae254a6ce7eff07f9a404e3acc0f65.tar.gz nextcloud-server-4f4d777767ae254a6ce7eff07f9a404e3acc0f65.zip |
Cleanup admin delegation setting page
- Simplify code a bit
- Add link to doc
- Use Nextcloud vue component a bit more
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/settings/lib')
-rw-r--r-- | apps/settings/lib/Settings/Admin/Delegation.php | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/apps/settings/lib/Settings/Admin/Delegation.php b/apps/settings/lib/Settings/Admin/Delegation.php index 401d5b028cc..274b71150ed 100644 --- a/apps/settings/lib/Settings/Admin/Delegation.php +++ b/apps/settings/lib/Settings/Admin/Delegation.php @@ -31,30 +31,27 @@ use OCP\IGroupManager; use OCP\Settings\IDelegatedSettings; use OCP\Settings\IManager; use OCP\Settings\ISettings; +use OCP\IURLGenerator; class Delegation implements ISettings { - /** @var IManager */ - private $settingManager; - - /** @var IInitialState $initialStateService */ - private $initialStateService; - - /** @var IGroupManager $groupManager */ - private $groupManager; - - /** @var AuthorizedGroupService $authorizedGroupService */ - private $authorizedGroupService; + private IManager $settingManager; + private IInitialState $initialStateService; + private IGroupManager $groupManager; + private AuthorizedGroupService $authorizedGroupService; + private IURLGenerator $urlGenerator; public function __construct( IManager $settingManager, IInitialState $initialStateService, IGroupManager $groupManager, - AuthorizedGroupService $authorizedGroupService + AuthorizedGroupService $authorizedGroupService, + IURLGenerator $urlGenerator ) { $this->settingManager = $settingManager; $this->initialStateService = $initialStateService; $this->groupManager = $groupManager; $this->authorizedGroupService = $authorizedGroupService; + $this->urlGenerator = $urlGenerator; } /** @@ -128,6 +125,7 @@ class Delegation implements ISettings { $this->initSettingState(); $this->initAvailableGroupState(); $this->initAuthorizedGroupState(); + $this->initialStateService->provideInitialState('authorized-settings-doc-link', $this->urlGenerator->linkToDocs('admin-delegation')); return new TemplateResponse(Application::APP_ID, 'settings/admin/delegation', [], ''); } |