-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add typed events for all group hooks and legacy events #18350
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Christoph Wurst <[email protected]>
ChristophWurst
added
enhancement
3. to review
Waiting for reviews
technical debt
labels
Dec 11, 2019
ChristophWurst
requested review from
rullzer,
georgehrke,
kesselb,
skjnldsv and
gary-kim
December 11, 2019 09:23
4 tasks
CI is happy 🚀 |
skjnldsv
approved these changes
Dec 11, 2019
rullzer
approved these changes
Dec 11, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then I'm happy as well.
8 tasks
MorrisJobke
added a commit
to nextcloud/documentation
that referenced
this pull request
Aug 10, 2020
* LoadAdditionalScripts (@rullzer) - nextcloud/server#16641 * LoadViewerEvent (@skjnldsv) - nextcloud/viewer#271 * RegisterDirectEditorEvent (@juliushaertl) - nextcloud/server#17625 * typed events for files scanner (@ChristophWurst) - nextcloud/server#18351 * typed events for group mangement (@ChristophWurst) - nextcloud/server#18350 * AddContentSecurityPolicyEvent (@rullzer) - nextcloud/server#15730 * UserLiveStatusEvent (@georgehrke) - nextcloud/server#21186 * password_policy events (@ChristophWurst) - nextcloud/server#18019 * AddFeaturePolicyEvent (@rullzer) - nextcloud/server#16613 * ShareCreatedEvent (@rullzer) - nextcloud/server#18384 * LoadSettingsScriptsEvent (@blizzz) - nextcloud/server#21475 * flow events (@rullzer) - nextcloud/server#18535 Signed-off-by: Morris Jobke <[email protected]>
backportbot-nextcloud bot
pushed a commit
to nextcloud/documentation
that referenced
this pull request
Aug 10, 2020
* LoadAdditionalScripts (@rullzer) - nextcloud/server#16641 * LoadViewerEvent (@skjnldsv) - nextcloud/viewer#271 * RegisterDirectEditorEvent (@juliushaertl) - nextcloud/server#17625 * typed events for files scanner (@ChristophWurst) - nextcloud/server#18351 * typed events for group mangement (@ChristophWurst) - nextcloud/server#18350 * AddContentSecurityPolicyEvent (@rullzer) - nextcloud/server#15730 * UserLiveStatusEvent (@georgehrke) - nextcloud/server#21186 * password_policy events (@ChristophWurst) - nextcloud/server#18019 * AddFeaturePolicyEvent (@rullzer) - nextcloud/server#16613 * ShareCreatedEvent (@rullzer) - nextcloud/server#18384 * LoadSettingsScriptsEvent (@blizzz) - nextcloud/server#21475 * flow events (@rullzer) - nextcloud/server#18535 Signed-off-by: Morris Jobke <[email protected]>
MorrisJobke
added a commit
to nextcloud/documentation
that referenced
this pull request
Aug 10, 2020
* LoadAdditionalScripts (@rullzer) - nextcloud/server#16641 * LoadViewerEvent (@skjnldsv) - nextcloud/viewer#271 * RegisterDirectEditorEvent (@juliushaertl) - nextcloud/server#17625 * typed events for files scanner (@ChristophWurst) - nextcloud/server#18351 * typed events for group mangement (@ChristophWurst) - nextcloud/server#18350 * AddContentSecurityPolicyEvent (@rullzer) - nextcloud/server#15730 * UserLiveStatusEvent (@georgehrke) - nextcloud/server#21186 * password_policy events (@ChristophWurst) - nextcloud/server#18019 * AddFeaturePolicyEvent (@rullzer) - nextcloud/server#16613 * ShareCreatedEvent (@rullzer) - nextcloud/server#18384 * LoadSettingsScriptsEvent (@blizzz) - nextcloud/server#21475 * flow events (@rullzer) - nextcloud/server#18535 Signed-off-by: Morris Jobke <[email protected]>
MorrisJobke
added a commit
to nextcloud/documentation
that referenced
this pull request
Aug 10, 2020
* LoadAdditionalScripts (@rullzer) - nextcloud/server#16641 * LoadViewerEvent (@skjnldsv) - nextcloud/viewer#271 * RegisterDirectEditorEvent (@juliushaertl) - nextcloud/server#17625 * typed events for files scanner (@ChristophWurst) - nextcloud/server#18351 * typed events for group mangement (@ChristophWurst) - nextcloud/server#18350 * AddContentSecurityPolicyEvent (@rullzer) - nextcloud/server#15730 * UserLiveStatusEvent (@georgehrke) - nextcloud/server#21186 * password_policy events (@ChristophWurst) - nextcloud/server#18019 * AddFeaturePolicyEvent (@rullzer) - nextcloud/server#16613 * ShareCreatedEvent (@rullzer) - nextcloud/server#18384 * LoadSettingsScriptsEvent (@blizzz) - nextcloud/server#21475 * flow events (@rullzer) - nextcloud/server#18535 Signed-off-by: Morris Jobke <[email protected]>
ref #14552 |
MorrisJobke
added a commit
that referenced
this pull request
Nov 10, 2020
Those mappings exist and we will remove the first ones (labeled as `old`): old: `\OC_Hook::listen('OC_Group', 'pre_createGroup', array('run' => true, 'gid' => $gid));` since OC 8 (owncloud/core#12618): `$groupManager->listen('\OC\Group', 'preCreate', function ($gid) { ... });` since NC 17 (#18350): `OCP\Group\Events\BeforeGroupCreatedEvent` old: `\OC_Hook::emit('OC_User', 'post_createGroup', array('gid' => $gid->getGID()));` since OC 8 (owncloud/core#12618): `$groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $gid) { ... });` since NC 17 (#18350): `OCP\Group\Events\GroupCreatedEvent` old: `\OC_Hook::emit('OC_Group', 'pre_deleteGroup', array('run' => true, 'gid' => $group->getGID()));` since OC 8 (owncloud/core#12618): `$groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) { ... });` since NC 17 (#18350): `OCP\Group\Events\BeforeGroupDeletedEvent` old: `\OC_Hook::emit('OC_User', 'post_deleteGroup', array('gid' => $group->getGID()));` since OC 8 (owncloud/core#12618): `$groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) { ... });` since NC 17 (#18350): `OCP\Group\Events\GroupDeletedEvent` old: `\OC_Hook::emit('OC_Group', 'pre_addToGroup', array('run' => true, 'uid' => $user->getUID(), 'gid' => $group->getGID()));` since OC 8 (owncloud/core#12618): `$groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { ... });` since NC 17 (#18350): `OCP\Group\Events\BeforeUserAddedEvent` old: `\OC_Hook::emit('OC_Group', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID()));` since OC 8 (owncloud/core#12618): `$groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { ... });` since NC 17 (#18350): `OCP\Group\Events\UserAddedEvent` Signed-off-by: Morris Jobke <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is a lot of dark magic we use for user change propagation. That is why removing the emit stuff in #18322 failed on CI terribly. This needs a more in-depth analysis.
To still get the new events in for 18 I created a modified version where I leave the old mechanisms in place and just convert the old stuff to the new (and not the other way around). The cleanup will follow for 19.
Ref #18348
Supersedes #18322.