-
-
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
OCC command to delete calendars #26421
OCC command to delete calendars #26421
Conversation
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.
Instead of a separate command to delete birthday calendars I would just go with a --birthday
option for the delete-calendar
command, which would set the calendar URI to BirthdayService::BIRTHDAY_CALENDAR_URI
.
77e5a7d
to
aa4f375
Compare
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.
Looks good to me now, but I recommend we wait for #26083 to be merged, then we can rebase on it and add a -f
force parameter (which would be passed to CaldavBackend::deleteCalendar).
Ok, thank you |
@mattian Please rebase on master and add the option to force delete calendars as discussed. |
aa4f375
to
3fe5a7c
Compare
3fe5a7c
to
d643fc8
Compare
done |
@mattian please have a look at the inline annotations generated by psalm. a few types are not clear for the static analysis :) |
InputInterface $input, | ||
OutputInterface $output | ||
): int { | ||
$user = $input->getArgument('uid'); |
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.
please cast to string to ensure this is string and silence the warnings
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.
A cast makes psalm complain about a PossiblyInvalidCast
from array<array-key, string> to string. Annotating $user
as a string variable seems to silence the warnings
d643fc8
to
f8a3d2d
Compare
f8a3d2d
to
bb580f5
Compare
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.
Lint is happy
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.
Let's check if the duplicate logic of birthday calendars is necessary, the rest looks fine 👍
Add occ command 'dav:delete-calendar' to delete a user's calendar. Signed-off-by: Mattia Narducci <[email protected]>
bb580f5
to
4850dae
Compare
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.
Code looks good!
Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22 |
@mattian FYI your commit isn't associated with your github user. You might want to add the email address to your account so you are correctly shown as contributor :) |
Document occ command dav:delete-calendar introduced in Nextcloud 22. See nextcloud/server#26421 Signed-off-by: Mattia Narducci <[email protected]>
Document occ command dav:delete-calendar introduced in Nextcloud 22. See nextcloud/server#26421 Signed-off-by: Mattia Narducci <[email protected]>
Document occ command dav:delete-calendar introduced in Nextcloud 22. See nextcloud/server#26421 Signed-off-by: Mattia Narducci <[email protected]>
Closes #25771.
Add occ command 'dav:delete-calendar' to delete user's calendars.