discourse-ldap-auth icon indicating copy to clipboard operation
discourse-ldap-auth copied to clipboard

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

Open robe2 opened this issue 1 year ago • 3 comments

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?

robe2 avatar Dec 13 '23 22:12 robe2

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.

jonmbake avatar Dec 14 '23 11:12 jonmbake

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.

Salamandar avatar Aug 30 '24 11:08 Salamandar

@Salamandar Feel free to open a PR.

jonmbake avatar Aug 30 '24 20:08 jonmbake