Skip to content
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

allow user to toggle visibility of the calendar for a deck board #4622

Merged
merged 2 commits into from Apr 27, 2023

Conversation

schiessle
Copy link
Member

@schiessle schiessle commented Apr 25, 2023

Summary

The calendar object needs to be exposed with "write-properties" in order to allow users to hide/show the corresponding calendar in the calendar app. It doesn't has any affects on the general permissions for the whole board or the individual cards. As soon as you select a calendar item you jump to the deck app where the normal deck permissions are applied.

As far as I understand it, caldav knows two kind if write permissions:

  • "{DAV:}write" for editing calendar entries
  • "{DAV:}write-properties" to only edit properties (like the visibility) of the calendar.

Looking at how we treat shared regular calendars, I think the solution should be fine: https://github.com/nextcloud/server/blob/master/apps/dav/lib/CalDAV/Calendar.php#L181

TODO

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Tests (unit, integration, api and/or acceptance) are included
  • Documentation (manuals or wiki) has been updated or is not required

@juliushaertl This was a quick try to fix a issue I discovered, does it makes sense?

Copy link
Member

@juliushaertl juliushaertl left a comment

Choose a reason for hiding this comment

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

Makes sense in general, thanks a lot. However we'll need some additional permission check then for the places where we update the board details through the property changes: https://github.com/nextcloud/deck/blob/main/lib/DAV/Calendar.php#L187-L204

The calendar object needs to be exposed with "write" properties in order to allow users to hide/show the corresponding calendar in the calendar app. It doesn't has any affects on the general permissions for the whole board or the tasks. As soon as you select a task you jump to the deck app where the normal deck permissions are applied.

fixes: #4618

Signed-off-by: Björn Schießle <bjoern@nextcloud.com>
@schiessle
Copy link
Member Author

@juliushaertl I added the additional checks.

@cypress
Copy link

cypress bot commented Apr 26, 2023

Passing run #845 ↗︎

0 15 0 0 Flakiness 0

Details:

Merge e2a4737 into 7f6895a...
Project: Deck Commit: 24800abc21 ℹ️
Status: Passed Duration: 02:47 💡
Started: Apr 27, 2023 6:39 AM Ended: Apr 27, 2023 6:41 AM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

…e user doesn't has the "manage" permissions

Signed-off-by: Bjoern Schiessle <bjoern@nextcloud.com>
@juliushaertl
Copy link
Member

Tested and works. I quickly fixed the php code style error.

@juliushaertl
Copy link
Member

DCO check seems confused

@juliushaertl juliushaertl merged commit 42aff58 into main Apr 27, 2023
21 of 22 checks passed
@juliushaertl juliushaertl deleted the allow-to-change-visibility branch April 27, 2023 06:43
@juliushaertl
Copy link
Member

/backport to stable26

@juliushaertl
Copy link
Member

/backport to stable25

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

Successfully merging this pull request may close these issues.

Deck calendar always visible in calendar app
2 participants