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

Disable sharing calendars via link when sharing via link is disabled #34372

Closed
wants to merge 2 commits into from

Conversation

pboguslawski
Copy link
Contributor

This mod disallows sharing calendars via link when shareapi_allow_links is disabled.

Related: nextcloud/calendar#525
Related: nextcloud/calendar#4399
Author-Change-Id: IB#1126264
Signed-off-by: Pawel Boguslawski pawel.boguslawski@ib.pl

This mod disallows sharing calendars via link when `shareapi_allow_links`
is disabled.

Related: nextcloud/calendar#525
Related: nextcloud/calendar#4399
Author-Change-Id: IB#1126264
Signed-off-by: Pawel Boguslawski <pawel.boguslawski@ib.pl>
pboguslawski added a commit to ibpl/calendar that referenced this pull request Oct 1, 2022
This mod hides sharing calendar via link in UI when `shareapi_allow_links` is disabled.
Should be applied together with nextcloud/server#34372

Related: nextcloud/server#34372
Related: nextcloud#525
Related: nextcloud#4399
Author-Change-Id: IB#1126264
Signed-off-by: Pawel Boguslawski <pawel.boguslawski@ib.pl>
@miaulalala
Copy link
Contributor

Thanks for your PR! A couple small change requests only :)

@szaimen szaimen added this to the Nextcloud 26 milestone Oct 1, 2022
@szaimen szaimen added the 3. to review Waiting for reviews label Oct 1, 2022
Fixes: 45eefc2
Related: nextcloud#34372
Author-Change-Id: IB#1126264
Signed-off-by: Pawel Boguslawski <pawel.boguslawski@ib.pl>
\OC::$server->getConfig(),
\OC::$server->getURLGenerator()
));
if (\OC::$server->getConfig()->getAppValue('core', 'shareapi_allow_links', 'yes') === 'yes') {

Check notice

Code scanning / Psalm

DeprecatedMethod

The method OC\Server::getConfig has been marked as deprecated
));
if (\OC::$server->getConfig()->getAppValue('core', 'shareapi_allow_links', 'yes') === 'yes') {
$this->server->addPlugin(new \OCA\DAV\CalDAV\Publishing\PublishPlugin(
\OC::$server->getConfig(),

Check notice

Code scanning / Psalm

DeprecatedMethod

The method OC\Server::getConfig has been marked as deprecated
if (\OC::$server->getConfig()->getAppValue('core', 'shareapi_allow_links', 'yes') === 'yes') {
$this->server->addPlugin(new \OCA\DAV\CalDAV\Publishing\PublishPlugin(
\OC::$server->getConfig(),
\OC::$server->getURLGenerator()

Check notice

Code scanning / Psalm

DeprecatedMethod

The method OC\Server::getURLGenerator has been marked as deprecated
@tcitworld tcitworld added the feature: caldav Related to CalDAV internals label Oct 14, 2022
@pboguslawski pboguslawski changed the title Disable sharing calendars via link when sharik via link is disabled Disable sharing calendars via link when sharing via link is disabled Oct 28, 2022
@pboguslawski
Copy link
Contributor Author

pboguslawski commented Oct 28, 2022

Current solution (unregistering plugin) does not work correctly so please wait with merging until final solution is proposed.

tcitworld pushed a commit that referenced this pull request Oct 28, 2022
Fixes: 45eefc2
Related: #34372
Author-Change-Id: IB#1126264
Signed-off-by: Pawel Boguslawski <pawel.boguslawski@ib.pl>
@tcitworld
Copy link
Member

@pboguslawski That's correct, thanks for checking! Sadly the AllowedSharingModes didn't fallback as I planned when the plugin was unregistered, so I made #34873 to extract exposing this information into it's own plugin. That should do it, please have a go and test.

@pboguslawski
Copy link
Contributor Author

Replaced with #34873.

tcitworld pushed a commit that referenced this pull request Jan 20, 2023
Fixes: 45eefc2
Related: #34372
Author-Change-Id: IB#1126264
Signed-off-by: Pawel Boguslawski <pawel.boguslawski@ib.pl>
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 feature: caldav Related to CalDAV internals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants