Use activity registration for the settings

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2020-01-31 15:12:32 +01:00
parent 4765f5b3db
commit b68cb1fc0c
No known key found for this signature in database
GPG Key ID: F941078878347C0C
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\SyncClients</personal-section>
</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>

View File

@ -149,15 +149,6 @@ class Application extends App {
}
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', 'changeUser', $this, 'onChangeInfo');