jonmbake / discourse-ldap-auth

Discourse plugin to enable LDAP/Active Directory authentication.
MIT License
70 stars 53 forks source link

LDAP settings don't show unless you change the plugin folder to ldap #77

Open robe2 opened 10 months ago

robe2 commented 10 months ago

I'm not sure if this is by design or a recent change or I'm just doing something wrong when I installed.

I just installed discourse, using the docker install here:

https://github.com/discourse/discourse_docker.git

and after enabling the LDAP plugin in my app.yml like so:

hooks:
    after_code:
        - exec:
            cd: $home/plugins
            cmd:
                - git clone https://github.com/jonmbake/discourse-ldap-auth.git

Then doing:

./launcher rebuild app 

The LDAP plugin showed as installed, but when going to https://discourse.mydomain.org/admin/plugins (and clicking the Edit Settings on LDAP)

The screen was blank. What finally worked, was changing the directory to match the name of the plugin, cause I noticed it was complaining in the logs plugin is called "ldap", but plugin will be installed in discourse-ldap-auth or some such thing.

So to fix I forced it to be installed in ldap folder like so:

hooks:
    after_code:
        - exec:
            cd: $home/plugins
            cmd:
                - git clone -b v0.6.1 https://github.com/jonmbake/discourse-ldap-auth.git ldap

I think I had tried -b v0.6.1 before settling on having the foldername, so I don't think it's the version that fixed it.

Is this expected? or did I do something wrong or miss an instruction?

jonmbake commented 10 months ago

Hmm... This appears to be a caused by a change in discourse. In the past, the folder name did not have to match the plugin name. Not finding an issue in https://meta.discourse.org/ though.

Salamandar commented 2 months ago

At install time, I get this error:

Plugin name is 'ldap', but plugin directory is named 'discourse-ldap-auth'

So this looks like you should change the name of the plugin.

jonmbake commented 2 months ago

@Salamandar Feel free to open a PR.