Skip to content
This repository has been archived by the owner on Nov 14, 2018. It is now read-only.

IMAP login can be restricted to a specific domain name. #2093

Merged
merged 1 commit into from
Oct 21, 2016
Merged

IMAP login can be restricted to a specific domain name. #2093

merged 1 commit into from
Oct 21, 2016

Conversation

kosli
Copy link
Contributor

@kosli kosli commented Jul 30, 2015

I have an instance of ownCloud which is used only for one domain and I wanted to make the users able to login via IMAP only with this specific domain name.
If no domain name is given in the configuration file, then the behaviour is the same as before.

This closes #1708.

@karlitschek
Copy link
Contributor

Looks good from my point of view. Not tested.
What do you think @blizzz
👍

@t2d
Copy link

t2d commented Nov 27, 2015

Yes, this works. I came up independently with the same solution. Please integrate!
However, you should note, that it changes the paths for f.e. caldav links.
This is a reasonable change, but it could lead to confusion.

@RafaelKa
Copy link

👍, but it is to static. It is only for one trusted domain, what about trusted domain list?

@t2d
Copy link

t2d commented Feb 17, 2016

But than you run into collisions in namespaces. user1@domain1 and user1@domain2 would both be user1.

@RafaelKa
Copy link

@t2d, yes could happen by developing without thinking :-P.
Just using whole Email(incl. Domain) for login ;) ...
Maybe map imap hosts with email-domains, if they are different like :

'user_backends' => [
    [
      'class' => 'OC_User_IMAP',
      'arguments' => [
        '{imap.server1.net:143/imap/tls}', // <- for bc reasons
        [
          '{imap.server1.net:143/imap/tls}' => ['exaple.tld', 'second.tld'],
          '{imap.server2.net:143/imap/tls}' => ['some-cloud.tld', 'some-isp.tld'],
        ]
      ]
    ]
  ],

or if it works without bc:

'user_backends' => [[ 
      'class' => 'OC_User_IMAP', 'arguments' => [
          '{imap.server1.net:143/imap/tls}' => ['exaple.tld', 'second.tld'],
          '{imap.server2.net:143/imap/tls}' => ['some-cloud.tld', 'some-isp.tld']
  ]]],

@kosli
Copy link
Contributor Author

kosli commented Jul 21, 2016

any update on this?

@PVince81
Copy link
Contributor

I think @RafaelKa gave a 👍 so I guess this means it was tested.
I don't know enough about IMAP and can't test this, so if you all IMAP users/devs agree that this is a good addition, then we can merge this.

@RafaelKa
Copy link

RafaelKa commented Oct 21, 2016

notwithstanding, that we do not using composer: Do we need to define ext-imap somewhere as dependency?

And yes, I tested this patch some time ago...

@PVince81
Copy link
Contributor

Usually I think it is possible to specify app dependencies in info.xml. But trouble here is that this app provides different mechanisms, so you can't impose a lib dependencies for users who are only interested in the SMB login plugin for example. Ideal would be to have each auth type in separate apps...

So I'd say no for now.

Since you tested this, I'm merging this then. Thanks!

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

Successfully merging this pull request may close these issues.

restrict to one domain for imap external auth
5 participants