I have a public Jira instance that allows people to register to create new accounts, but the same instance is used by internal people that are using LDAP to authenticate.
The main problem is how to prevent people from outside from creating accounts with the same name as ones from intranet?
Here is a client-side restriction that works if you add this code to the Annoucement Banner in admin pannel.
Still rememeber that this is only client side, so people can go around this if they really want.
<script type="text/javascript"> if(typeof jQuery == 'undefined'){ document.write('<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.min.js"></'+'script>'); } jQuery(function(){ jQuery('#signup').submit(function(e) { username = escape(document.getElementById("signup-username").value); if (! /^[a-zA-Z0-9]+\.[a-zA-Z0-9]+$/.test(username)) { alert("Your username is not acceptable.\n\nYou must use 'firstname.lastname' pattern when you create your username.\n\nYou must have a dot inside your username."); stopEvent(e); } }); }); </script>
Hey Sorin,
I would support the option of
"force a specific pattern (regexp) for creation of local accounts."
You can use Javascript code on top of JIRA to achieve this. This would make sure that the usernames are never the same.
The other option with the email addresses
"even better allow, people to login using their email address (email as login). I know that this could be a problem if you have several accounts with the same email, something that currently is possible in Jira, even if I wish not to be possible."
seems prone to errors, so I would not recommend it.
In addition to above options, you could write a plugin in order to achieve this. If your team does not have the expertise to implement this, you could contact one of our Experts who are professionals in implementing requirements like these.
Regards,
Ruchi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, I can't think of any out-of-the-box way to handle it, but you can edit the registration page with some javascript.
Use the JIRA REST API to search for users with the username used to register and reject if a result returns from the REST search. Does this work for you?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It doesn't work because corporate accounts can be created at any time. All I am looking for is to force a specific pattern (regexp) for creation of local accounts.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, you can add the regexp via javascript just as well. Are you looking for a plugin or an existing solution instead? We haven't had to do this just yet.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1st JavaScript is client side so there is no guarantee that people will not get around this, but probably I could leave with this problem. 2nd, which is more important: I don't want to modify Jira core files because the changes will be lost at each upgrade, which is quite often.
A plugin will probably do.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.