-
-
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
feat: hide caldav server settings if no app uses the caldav backend #46510
Conversation
3c01364
to
ed4f67e
Compare
If we are changing info.xsd we can also move this into the dependencies element. I think that makes the meaning clearer. The current approach is ambiguous as it could mean that the apps that list caldav as backend are providing it. |
ed4f67e
to
6b3fd3f
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 so far!
resources/app-info.xsd
Outdated
<xs:enumeration value="caldav"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
|
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.
don't forget to also submit these changes to the appstore repo
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.
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
6b3fd3f
to
e42bcea
Compare
So you won't be able to set the caldav settings if you want to use calendar sync with clients without the Calendar app? Apart from hiding the settings, is there any more consequences under consideration? |
Yes, that is the behavior that was decided. We simply hide the settings. The case that someone uses the caldav backend without a Nextcloud frontend app is not covered. |
I guess we should add a note to https://docs.nextcloud.com/server/latest/admin_manual/groupware/calendar.html for admins who can't find the settings |
* | ||
* @since 30.0.0 | ||
*/ | ||
public function isBackendRequired(string $backend): bool; |
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.
@st3iny Please document in https://docs.nextcloud.com/server/latest/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_30.html#id1
(Saw the ticket, just putting it to all PRs)
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.
It's a bit problematic that we don't have CI in place to confirm this, but https://github.com/nextcloud/appstore/blob/master/nextcloudappstore/api/v1/release/info.xsd needs to be kept in sync.
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.
@st3iny I updated to nextcloud 30.0.2 and I was getting hundreds of errors per minute leading me to this PR.
I was able to fix this by changing that line: # Old
foreach ($appInfo['dependencies']['backend'] as $appBackend) {
# My change to stop the error spam
foreach ($appInfo['dependencies']['backend'] ?? [] as $appBackend) { I hope you can include this fix in a future version. Thank you. |
Thanks for reporting. The value in |
Summary
This PR introduces a dependency type to
info.xml
calledbackends
which can be used by apps to express their intent to use a specific server-side backend. Currently, the only backend to be required iscaldav
.The caldav server admin settings will be hidden if no app is requiring the
caldav
backend.Exemplary
info.xml
Hidden settings section
Checklist