-
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
Add a trusted domain wizard #10584
Add a trusted domain wizard #10584
Conversation
Adds a little button to the trusted domain warning, if an admin clicks on the warning he will be redirected to ownCloud and asked whether he want to trust this domain. By far not the cleanest code, or clean at all, but does the job and I don't see a reason to make a lot of changes for this little improvement.
🚀 Test Passed. 🚀 |
@LukasReschke I like your admin name :) |
very nice improvement. 👍 Not tested. |
User is not logged-in: Should get redirected to login page and after login to the admin page where this window is open. User has no admin rights: User is redirected to default app since he can't open the admin page. So no message. |
But then you can access the ownCloud instance: shouldn't that be denied by the trusted domain setting? |
Got it. You redirect to a valid domain. |
Yup. The URL generator uses the first specified valid domain in case a domain is untrusted. |
} | ||
|
||
if(isset($_POST['trustedDomain'])) { | ||
$trustedDomains = OC_Config::getValue('trusted_domains'); |
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.
OC_Config is depricated
|
the message box is not closing after hitting yes ? |
Well. It should - what browser? |
chromium |
but it looks like there are some js errors in master for me 👿 |
looks like odfviewer and texteditor has issues ... |
👍 |
well - hitting reload after the message box disappeared will show the message box again and again |
I'll take a look at this.
Requires changes to the public API since not everything is exposed. I'll take care of it. |
It would be fine for me for now to replace OC_Config:: by \OC::$server->getConfig()-> |
Then we should also be able to use |
I see - hmmmm - there was a reason for not adding this .... .. what the heck - let's add the method |
@DeepDiver1975 I exposed |
A new inspection was created. |
ready for merge from my pov 👍 |
💣 Test Failed. 💣 |
only js unit tests |
Add a trusted domain wizard
not a bug fix but still interesting for oc7 @karlitschek ??? |
@karlitschek What about backporting this for 7.0.3? |
yes. please backport :-) |
One more thing here.. I just test that and it didn´t add port (if you are using different one) to the configuration. My web is running on test.domain.com:4443 and in config is only test.domain.com and owncloud is asking again and again for trusted domain. at least on OC 7.0.2 |
Good catch. @LukasReschke how are custom ports handled normally in this domain? |
I think they are ignored in the wizard. I haven't thought of that case... Let me create a PR for this next week. I'm off this weekend. |
Ref #10584 (comment) Backport of 2590a4d from master
Adds a little button to the trusted domain warning, if an admin clicks on the warning he will be redirected to ownCloud and asked whether he want to trust this domain.
By far not the cleanest code, or clean at all, but does the job and I don't see a reason to make a lot of changes for this little improvement. I think there is no need in making "yet another" admin setting, automagic is at least preferred by myself ;-)
A check on the wording would be much appreciated.
How it looks:
![screen shot 2014-08-21 at 22 22 56](https://cloud.githubusercontent.com/assets/878997/4002902/69387dec-2971-11e4-9a7f-1fc01e76f99b.png)
![screen shot 2014-08-21 at 22 23 06](https://cloud.githubusercontent.com/assets/878997/4002911/76fc453a-2971-11e4-937d-afd9695e45e7.png)
@MTRichards @craigpg @karlitschek