-
Notifications
You must be signed in to change notification settings - Fork 2.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
dont allow user to override admin sharing settings when its disabled #34764
Conversation
@@ -57,7 +57,7 @@ public function getPanel() { | |||
$tmpl->assign('incomingServer2serverShareEnabled', $this->shareProvider->isIncomingServer2serverShareEnabled()); | |||
$tmpl->assign( | |||
'autoAcceptTrusted', | |||
$this->config->getAppValue('federatedfilesharing', 'auto_accept_trusted', 'no') | |||
$this->config->getAppValue('federatedfilesharing', 'auto_accept_trusted', 'no') === 'yes' |
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.
fix for #34763
apps/federatedfilesharing/templates/settings-personal-sharing.php
Outdated
Show resolved
Hide resolved
for the template, how about having 2 different templates, one for the "nothing to configure" and another one for the normal content? I'm not sure it this approach can help with the unittests and simplify the code. In addition, you're following the same approach for the federated sharing and "normal" sharing, is this what we want? (just checking) |
I think it makes sense. Using two different template can reduce template and panel complexity.
According to the agreement on this comment https://github.com/owncloud/enterprise/issues/3128#issuecomment-471185144, it is desired same functionality for both federated and local sharing. |
Codecov Report
@@ Coverage Diff @@
## master #34764 +/- ##
============================================
+ Coverage 65.3% 65.31% +<.01%
- Complexity 18479 18483 +4
============================================
Files 1209 1209
Lines 69971 69996 +25
Branches 1280 1280
============================================
+ Hits 45695 45715 +20
- Misses 23904 23909 +5
Partials 372 372
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #34764 +/- ##
============================================
+ Coverage 65.31% 65.31% +<.01%
- Complexity 18481 18487 +6
============================================
Files 1209 1209
Lines 69983 70009 +26
Branches 1280 1280
============================================
+ Hits 45706 45726 +20
- Misses 23905 23911 +6
Partials 372 372
Continue to review full report at Codecov.
|
879ff74
to
322ca36
Compare
some sharing tests failed, @karakayasemi please have a look. if you need assistance with adjusting or extending UI tests, feel free to ask @individual-it or @phil-davis |
@individual-it I tried to adapt acceptance tests to the new behavior, removed some of the issue tags. |
tests/acceptance/features/bootstrap/WebUIPersonalSharingSettingsContext.php
Outdated
Show resolved
Hide resolved
the tests look very good to me, just don't like the long lines very good, achievement unlocked 🎉 |
👍 for the acceptance tests part |
@jvillafanez I adjusted the code to your last review. Templates and panel simplified with creating two templates. Please review, one more time. Thanks. |
apps/federatedfilesharing/templates/settings-personal-sharing.php
Outdated
Show resolved
Hide resolved
apps/federatedfilesharing/tests/Panels/SharingPersonalPanelTest.php
Outdated
Show resolved
Hide resolved
@jvillafanez the code adjusted to your last suggestions, please review one more time. Thanks. |
Description
Implementation of https://github.com/owncloud/enterprise/issues/3128#issuecomment-471185144
If all the options are disabled by admin, instead of showing empty page, I added
Nothing to configure
sentence for each section.To-do:
Related Issue
Fixes https://github.com/owncloud/enterprise/issues/3128
Closes #34763
Closes #34708
Motivation and Context
How Has This Been Tested?
Nothing to configure
text in sharing personal panelTypes of changes
Checklist:
Open tasks: