Stash: How to change the message when a user is not allowed to log in?

Hello,

If a user is not allowed to log in to Stash, the message "You are not allowed to log in to Stash." (I don't know the exact wording as our language settings is german and then the message is "Sie sind nicht berechtigt, auf Stash zuzugreifen."). I want to change the message so that it reads something like "You are not allowed to log in to Stash. Please contact <e-mail@adress.de> if you need to log in."

I searched all possible settings that i could access from the web GUI and didn't find a place to change the message.

How may I change the message?

 

2 answers

1 accepted

This widget could not be displayed.

Hi Ronald,

Sadly there is no option to customize that message in Stash. 

If you really want to change it, you're going to have to modify the i18n'd string in the German language pack in your Stash distribution. Unfortunately you'll have to make the changes described below every time you upgrade Stash, so make sure that you really badly want this change before you proceed (and even then, you might want to script it up or something) smile

First step: take a backup of Stash, just in case something goes wrong.

The string in question is in properties file, inside a language pack JAR file nested in the bundled plugins ZIP file inside the directory you installed Stash in.

The ZIP file is in:

$STASH_INST/atlassian-stash/WEB-INF/classes/stash-bundled-plugins.zip

The JAR file inside the ZIP file is named:

stash-language-pack-de_DE-3.3.1-rc1-v2r158-2014-09-16.jar

The version number may differ depending on what version of Stash you're using. A JAR is just a ZIP file so you can extract it using whatever ZIP utility you're comfortable with.

The property you'll need to modify is stash.web.auth.notlicensed in the file:

WEB-INF/classes/com/atlassian/stash/internal/web/i18n/stash-webapp_de_DE.properties

After you've updated the file, you'll need to update the JAR with the new file, update the ZIP with the new JAR and then clear out your current plugins cache. You can do this by deleting the contents of $STASH_HOME/plugins/.bundled-plugins and $STASH_HOME/plugins/.osgi-cache

Then you should be able to restart Stash and the new string value will appear whenever a user is not allowed to log in to Stash.

Hope this helps!

cheers,

Tim

This widget could not be displayed.

Hello Tim,

thank you for the answer. Are there plans to make customizing such messagetexts a lot easier?

greetings from Germany

ronald

Hi Ronald, I must admit I'm no longer on the Stash team, but I haven't seen much demand for this in the past so I doubt there's any immediate plans. I'd recommend raising a suggestion at https://jira.atlassian.com in the STASH project to get direct feedback from the team :) cheers, Tim

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,315 views 8 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you