mirror of https://github.com/apache/archiva.git
do not display login and register links when creating admin is needed
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1234698 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d2c74bfc8e
commit
504251d440
|
@ -115,23 +115,6 @@ $(function() {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
checkCreateAdminLink=function(){
|
||||
$.ajax("restServices/redbackServices/userService/isAdminUserExists", {
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
var adminExists = JSON.parse(data);
|
||||
if (adminExists == false) {
|
||||
$("#create-admin-link").show();
|
||||
} else {
|
||||
$("#create-admin-link").hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
checkSecurityLinks=function(){
|
||||
var user = userLogged();
|
||||
$.log("checkSecurityLinks, user:"+user);
|
||||
|
@ -149,7 +132,22 @@ $(function() {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
checkCreateAdminLink=function(){
|
||||
$.ajax("restServices/redbackServices/userService/isAdminUserExists", {
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
var adminExists = JSON.parse(data);
|
||||
if (adminExists == false) {
|
||||
$("#create-admin-link").show();
|
||||
$("#login-link").hide();
|
||||
$("#register-link").hide();
|
||||
} else {
|
||||
$("#create-admin-link").hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// handle url with registration link
|
||||
$(document).ready(function() {
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
</a>
|
||||
</li>
|
||||
<li id="register-link" style="display: none">
|
||||
<a href="#" onclick="registerBox();">
|
||||
<a href="#" onclick="registerBox();" id="register-link-a">
|
||||
<span class="label notice">${register}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
|
Loading…
Reference in New Issue