Merge pull request #19240 from nextcloud/enh/settings/activity_registration

Use activity registration for the settings
This commit is contained in:
Roeland Jago Douma 2020-01-31 16:30:01 +01:00 committed by GitHub
commit 78c7e6f2c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 9 deletions

View File

@ -34,4 +34,21 @@
<personal-section>OCA\Settings\Sections\Personal\Security</personal-section> <personal-section>OCA\Settings\Sections\Personal\Security</personal-section>
<personal-section>OCA\Settings\Sections\Personal\SyncClients</personal-section> <personal-section>OCA\Settings\Sections\Personal\SyncClients</personal-section>
</settings> </settings>
<activity>
<settings>
<setting>OCA\Settings\Activity\GroupSetting</setting>
<setting>OCA\Settings\Activity\SecuritySetting</setting>
<setting>OCA\Settings\Activity\Setting</setting>
</settings>
<filter>
<filter>OCA\Settings\Activity\SecurityFilter</filter>
</filter>
<providers>
<provider>OCA\Settings\Activity\GroupProvider</provider>
<provider>OCA\Settings\Activity\Provider</provider>
<provider>OCA\Settings\Activity\SecurityProvider</provider>
</providers>
</activity>
</info> </info>

View File

@ -149,15 +149,6 @@ class Application extends App {
} }
public function register() { public function register() {
$activityManager = $this->getContainer()->getServer()->getActivityManager();
$activityManager->registerSetting(Setting::class); // FIXME move to info.xml
$activityManager->registerProvider(Provider::class); // FIXME move to info.xml
$activityManager->registerFilter(SecurityFilter::class); // FIXME move to info.xml
$activityManager->registerSetting(SecuritySetting::class); // FIXME move to info.xml
$activityManager->registerProvider(SecurityProvider::class); // FIXME move to info.xml
$activityManager->registerSetting(GroupSetting::class); // FIXME move to info.xml
$activityManager->registerProvider(GroupProvider::class); // FIXME move to info.xml
Util::connectHook('OC_User', 'post_setPassword', $this, 'onChangePassword'); Util::connectHook('OC_User', 'post_setPassword', $this, 'onChangePassword');
Util::connectHook('OC_User', 'changeUser', $this, 'onChangeInfo'); Util::connectHook('OC_User', 'changeUser', $this, 'onChangeInfo');