mirror of https://github.com/apache/archiva.git
ui for change rbac manager impl
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1447480 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9893b2d923
commit
9f9d3f9450
|
@ -1,69 +0,0 @@
|
||||||
package org.apache.archiva.rest.api.model;
|
|
||||||
/*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Olivier Lamy
|
|
||||||
* @since 1.4-M4
|
|
||||||
*/
|
|
||||||
@XmlRootElement( name = "redbackImplementationInformations" )
|
|
||||||
public class RedbackImplementationInformations
|
|
||||||
{
|
|
||||||
private List<UserManagerImplementationInformation> userManagerImplementationInformations;
|
|
||||||
|
|
||||||
private List<RBACManagerImplementationInformation> rbacManagerImplementationInformations;
|
|
||||||
|
|
||||||
public RedbackImplementationInformations()
|
|
||||||
{
|
|
||||||
// no op
|
|
||||||
}
|
|
||||||
|
|
||||||
public RedbackImplementationInformations(
|
|
||||||
List<UserManagerImplementationInformation> userManagerImplementationInformations,
|
|
||||||
List<RBACManagerImplementationInformation> rbacManagerImplementationInformations )
|
|
||||||
{
|
|
||||||
this.userManagerImplementationInformations = userManagerImplementationInformations;
|
|
||||||
this.rbacManagerImplementationInformations = rbacManagerImplementationInformations;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<UserManagerImplementationInformation> getUserManagerImplementationInformations()
|
|
||||||
{
|
|
||||||
return userManagerImplementationInformations;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserManagerImplementationInformations(
|
|
||||||
List<UserManagerImplementationInformation> userManagerImplementationInformations )
|
|
||||||
{
|
|
||||||
this.userManagerImplementationInformations = userManagerImplementationInformations;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<RBACManagerImplementationInformation> getRbacManagerImplementationInformations()
|
|
||||||
{
|
|
||||||
return rbacManagerImplementationInformations;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRbacManagerImplementationInformations(
|
|
||||||
List<RBACManagerImplementationInformation> rbacManagerImplementationInformations )
|
|
||||||
{
|
|
||||||
this.rbacManagerImplementationInformations = rbacManagerImplementationInformations;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1368,10 +1368,11 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
RedbackRuntimeConfigurationViewModel=function(redbackRuntimeConfiguration,userManagerImplementationInformations){
|
RedbackRuntimeConfigurationViewModel=function(redbackRuntimeConfiguration,userManagerImplementationInformations,rbacManagerImplementationInformations){
|
||||||
var self=this;
|
var self=this;
|
||||||
this.redbackRuntimeConfiguration=ko.observable(redbackRuntimeConfiguration);
|
this.redbackRuntimeConfiguration=ko.observable(redbackRuntimeConfiguration);
|
||||||
this.userManagerImplementationInformations=ko.observable(userManagerImplementationInformations);
|
this.userManagerImplementationInformations=ko.observableArray(userManagerImplementationInformations);
|
||||||
|
this.rbacManagerImplementationInformations=ko.observableArray(rbacManagerImplementationInformations);
|
||||||
|
|
||||||
this.usedUserManagerImpls=ko.observableArray([]);
|
this.usedUserManagerImpls=ko.observableArray([]);
|
||||||
|
|
||||||
|
@ -1697,18 +1698,20 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
|
||||||
var mainContent = $("#main-content");
|
var mainContent = $("#main-content");
|
||||||
mainContent.html(mediumSpinnerImg());
|
mainContent.html(mediumSpinnerImg());
|
||||||
|
|
||||||
$.ajax("restServices/archivaServices/redbackRuntimeConfigurationService/redbackImplementationInformations", {
|
$.ajax("restServices/archivaServices/redbackRuntimeConfigurationService/redbackImplementationsInformations", {
|
||||||
type: "GET",
|
type: "GET",
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
var userManagerImplementationInformations=data?mapManagerImplementationInformations(data.userManagerImplementationInformations):[];
|
var userManagerImplementationInformations=data?mapManagerImplementationInformations(data.userManagerImplementationInformations):[];
|
||||||
|
var rbacManagerImplementationInformations=data?mapManagerImplementationInformations(data.rbacManagerImplementationInformations):[];
|
||||||
|
$.log("rbacManagerImplementationInformations:"+rbacManagerImplementationInformations.length);
|
||||||
$.ajax("restServices/archivaServices/redbackRuntimeConfigurationService/redbackRuntimeConfiguration", {
|
$.ajax("restServices/archivaServices/redbackRuntimeConfigurationService/redbackRuntimeConfiguration", {
|
||||||
type: "GET",
|
type: "GET",
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
var redbackRuntimeConfiguration = mapRedbackRuntimeConfiguration(data);
|
var redbackRuntimeConfiguration = mapRedbackRuntimeConfiguration(data);
|
||||||
var redbackRuntimeConfigurationViewModel =
|
var redbackRuntimeConfigurationViewModel =
|
||||||
new RedbackRuntimeConfigurationViewModel(redbackRuntimeConfiguration,userManagerImplementationInformations);
|
new RedbackRuntimeConfigurationViewModel(redbackRuntimeConfiguration,userManagerImplementationInformations,rbacManagerImplementationInformations);
|
||||||
|
|
||||||
var groups=[];
|
var groups=[];
|
||||||
var useLdap = $.inArray("ldap",redbackRuntimeConfiguration.usedUserManagerImpls)>0
|
var useLdap = $.inArray("ldap",redbackRuntimeConfiguration.usedUserManagerImpls)>0
|
||||||
|
|
|
@ -988,14 +988,31 @@
|
||||||
<div class="span4 dotted">
|
<div class="span4 dotted">
|
||||||
<h5>${$.i18n.prop('redback.runtime.user-managers.impls.choosed')}</h5>
|
<h5>${$.i18n.prop('redback.runtime.user-managers.impls.choosed')}</h5>
|
||||||
<div style="min-height: 40px" id="user-mananagers-sortables-choosed"
|
<div style="min-height: 40px" id="user-mananagers-sortables-choosed"
|
||||||
data-bind="sortable: { template: 'redback-runtime-general-content-usermanagers', data:usedUserManagerImpls,afterMove: userManagerImplMoved}">
|
data-bind="sortable: { template: 'redback-runtime-general-content-impl-informations', data:usedUserManagerImpls,afterMove: userManagerImplMoved}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span4 dotted">
|
<div class="span4 dotted">
|
||||||
<h5>${$.i18n.prop('redback.runtime.user-managers.impls.available')}</h5>
|
<h5>${$.i18n.prop('redback.runtime.user-managers.impls.available')}</h5>
|
||||||
<div style="min-height: 40px"id="user-mananagers-sortables-availables"
|
<div style="min-height: 40px"id="user-mananagers-sortables-availables"
|
||||||
data-bind="sortable: {template: 'redback-runtime-general-content-usermanagers',data:availableUserManagerImpls,afterMove: userManagerImplMoved}">
|
data-bind="sortable: {template: 'redback-runtime-general-content-impl-informations',data:availableUserManagerImpls,afterMove: userManagerImplMoved}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="well">
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span4 dotted">
|
||||||
|
<h5>${$.i18n.prop('redback.runtime.rbac-managers.impls.choosed')}</h5>
|
||||||
|
<div style="min-height: 40px" id="rbac-mananagers-sortables-choosed"
|
||||||
|
data-bind="sortable: { template: 'redback-runtime-general-content-impl-informations', data:usedUserManagerImpls,afterMove: userManagerImplMoved}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="span4 dotted">
|
||||||
|
<h5>${$.i18n.prop('redback.runtime.rbac-managers.impls.available')}</h5>
|
||||||
|
<div style="min-height: 40px"id="rbac-mananagers-sortables-availables"
|
||||||
|
data-bind="sortable: {template: 'redback-runtime-general-content-impl-informations',data:availableUserManagerImpls,afterMove: userManagerImplMoved}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1232,7 +1249,7 @@
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script id="redback-runtime-general-content-usermanagers" type="text/html">
|
<script id="redback-runtime-general-content-impl-informations" type="text/html">
|
||||||
<div class="well draggable-item">
|
<div class="well draggable-item">
|
||||||
${$data.description}
|
${$data.description}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue