Skip to content

fix(CalDAV): Check for user status before serving public calendars - #63004

Merged
DerDreschner merged 1 commit into
masterfrom
fix/add-hide-calendars-setting
Aug 9, 2026
Merged

fix(CalDAV): Check for user status before serving public calendars#63004
DerDreschner merged 1 commit into
masterfrom
fix/add-hide-calendars-setting

Conversation

@DerDreschner

Copy link
Copy Markdown
Contributor

Summary

This PR adds support for the hide_disabled_user_shares setting on calendars.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@DerDreschner
DerDreschner requested review from hamza221 and susnux August 7, 2026 08:03
@DerDreschner DerDreschner self-assigned this Aug 7, 2026
@DerDreschner DerDreschner added 3. to review Waiting for reviews feature: caldav Related to CalDAV internals labels Aug 7, 2026
@DerDreschner
DerDreschner requested review from Altahrim, come-nc, icewind1991 and leftybournes and removed request for a team August 7, 2026 08:03
@DerDreschner

Copy link
Copy Markdown
Contributor Author

/backport to stable34

@DerDreschner

Copy link
Copy Markdown
Contributor Author

/backport to stable33

@DerDreschner

Copy link
Copy Markdown
Contributor Author

/backport to stable32

@DerDreschner
DerDreschner enabled auto-merge August 7, 2026 08:06
@DerDreschner
DerDreschner force-pushed the fix/add-hide-calendars-setting branch 4 times, most recently from 07259e9 to 40c4657 Compare August 7, 2026 09:18
Comment thread apps/dav/lib/CalDAV/PublicCalendarRoot.php Outdated
@DerDreschner
DerDreschner force-pushed the fix/add-hide-calendars-setting branch from 40c4657 to 7e53c36 Compare August 7, 2026 12:19
@DerDreschner
DerDreschner requested a review from tcitworld August 7, 2026 12:20
Signed-off-by: David Dreschner <david.dreschner@nextcloud.com>
@DerDreschner
DerDreschner force-pushed the fix/add-hide-calendars-setting branch from 7e53c36 to f1838ab Compare August 7, 2026 13:15
return true;
}

return $this->userManager->get((string)$name)?->isEnabled() !== false;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

null !== false ;)

Unlikely state I know, but found it still weird while reading the code.

@susnux susnux Aug 9, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should at least throw so that we know about this happening instead of silently succeed.
Or handle null just like false and do

Suggested change
return $this->userManager->get((string)$name)?->isEnabled() !== false;
return $this->userManager->get((string)$name)?->isEnabled() === true;

@DerDreschner
DerDreschner merged commit 2c0957b into master Aug 9, 2026
199 checks passed
@DerDreschner
DerDreschner deleted the fix/add-hide-calendars-setting branch August 9, 2026 15:41
@backportbot

backportbot Bot commented Aug 9, 2026

Copy link
Copy Markdown

The backport to stable32 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable32
git pull origin stable32

# Create the new backport branch
git checkout -b backport/63004/stable32

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick f1838ab8

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/63004/stable32

Error: Failed to check for changes with origin/stable32: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot

backportbot Bot commented Aug 9, 2026

Copy link
Copy Markdown

The backport to stable33 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable33
git pull origin stable33

# Create the new backport branch
git checkout -b backport/63004/stable33

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick f1838ab8

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/63004/stable33

Error: Failed to check for changes with origin/stable33: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot

backportbot Bot commented Aug 9, 2026

Copy link
Copy Markdown

The backport to stable34 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable34
git pull origin stable34

# Create the new backport branch
git checkout -b backport/63004/stable34

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick f1838ab8

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/63004/stable34

Error: Failed to check for changes with origin/stable34: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@DerDreschner

This comment was marked as spam.

@backportbot

This comment was marked as spam.

@DerDreschner

Copy link
Copy Markdown
Contributor Author

Manual backports opened - please review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews backport-request feature: caldav Related to CalDAV internals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants