Simple module to display useful information on Magnolia Admincentral login screen
-- This module allows to display few information on a Magnolia CMS Login screen, useful to let editorial and admin team to understand on which environment they are loggin in.
The quicker way to try this module is to download the .jar from releases and drop it in WEB-INF/lib folder of your Magnolia instance.
For a "pro" and indeed better usage, clone/fork this repo, declare it in your webapp pom.xml using the following Maven dependency:
<!-- Magnolia Module LoginInfo -->
<dependency>
<groupId>com.matteopelucco.magnolia</groupId>
<artifactId>magnolia-module-logininfo</artifactId>
<version>1.0.0</version>
</dependency>
If everything works fine, you should see the following standard information at Magnolia startup:
Just install it. No additional information are required. When installation ends, your login screen should appear with a new header bar:
This module has been succesfully tested against Magnolia CE / EE 5.4.x
What this module does in the background? During installation, it replace the standard "form" securityCallback:
with a dedicated class, able to expose a new infofn Freemarker utility, and a dedicated HTML file. This file, a Freemarker file to be more precise, is taken from the Community Edition of the current Magnolia installation, adding a simple header bar on top.
The simplest usage is to enter 2 lines of text:
- loginSummary: a kind of a "title", rendererd as an H3.
- loginDetail: a kind of a "subtitle", rendered as an H4.
But if you want to display instance-specific information, you can use Magnolia Properties, with the following syntax:
props['propname']
By default, module installs with this approach for the second line:
Feel free to change it, or to use as many properties you need (full properties list is available in "About Magnolia" config app)
You can put static text, like this:
Or you can show a lot of properties, mixed with text:
Or you can send useful messages to editors:
If needed, you can disable it removing the lines from Magnolia Module Logininfo cofiguration:
In this way, you can mix advanced environment configuration, decorating for instance only Author Instances and leaving Public Instances in the standard format, to avoid to offer server-side information to potential attackers (but consider to hide /.magnolia to the public. this is much, much better..)
After module wrong installation or customization, or module removal, you can encounter a screen like the following one:
In this case, you can use a different login method to bypass the "form" one: just put the following queryString:
?mgnlUserId=username&mgnlUserPSWD=password
In this way you can tune your Magnolia instance to use the standard configuration for "form" callback:
class: info.magnolia.cms.security.auth.callback.FormClientCallback
loginForm: /defaultMagnoliaLoginForm/login.html
Feel free to use this module as you want. But if you use it and you like it, let me know!