Merging with upstream

revert-70aa11f8
Ace 8 years ago
commit bd45b27cc9

@ -5,7 +5,7 @@
"httpsWebURL" : "%https.ip%",
"wssURL" : "https://localhost:9445",
"wsURL" : "%http.ip%",
"portalURL": "https://${server.ip}:9445",
"portalURL": "https://%server.ip%:9445",
"dashboardServerURL" : "%https.ip%",
"androidEnrollmentDir": "/android-web-agent/enrollment",
"windowsEnrollmentDir": "/windows-web-agent/enrollment",

@ -33,6 +33,9 @@ var conf = function () {
} else if ((typeof value === "string") && value.indexOf("%date-year%") > -1) {
var year = new Date().getFullYear();
return value.replace("%date-year%", year);
} else if ((typeof value === "string") && value.indexOf("%server.ip%") > -1) {
var getProperty = require("process").getProperty;
return value.replace("%server.ip%", getProperty("carbon.local.ip"));
}
return value;
}

@ -90,9 +90,15 @@ var handlers = function () {
"missing - setupTokenPairByPasswordGrantType(x, y)");
} else {
var tokenData;
var arrayOfScopes = devicemgtProps["scopes"];
var stringOfScopes = "";
arrayOfScopes.forEach(function (entry) {
stringOfScopes += entry + " ";
});
// accessTokenPair will include current access token as well as current refresh token
tokenData = tokenUtil.
getTokenPairAndScopesBySAMLGrantType(samlToken, encodedClientAppCredentials, "PRODUCTION");
getTokenPairAndScopesBySAMLGrantType(samlToken, encodedClientAppCredentials, stringOfScopes);
if (!tokenData) {
throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up token " +
"pair by password grant type. Error in token " +

@ -119,10 +119,9 @@
<div id="user-names">
<h4>
Select user role(s)
<br><br>
<div style="max-height: 200px; overflow: auto" id="rolesListing">
</div>
</h4>
<div class="wr-input-control" id="rolesListing">
</div>
</div>
</div>
<div class="modal-footer">
@ -402,3 +401,19 @@
{{js "js/listing.js"}}
{{/if}}
{{/zone}}
{{#zone "topCss"}}
<style>
.select2-dropdown {
z-index: 999999999;
}
.wr-input-control {
color: black;
}
.select2-selection__choice {
font-size: medium;
}
</style>
{{/zone}}

@ -391,14 +391,7 @@ function attachEvents() {
listAllRoles(groupId);
var shareGroupNextLink = $("a#share-group-next-link");
shareGroupNextLink.click(function () {
var roles = [];
$('.modal .roleCheckBoxes').each(
function () {
if ($(this).is(':checked')) {
roles.push($(this).data('role-name'));
}
}
);
var roles = $("#roles").val();
updateGroupShare(groupId, roles);
});
@ -505,15 +498,11 @@ function markAlreadySavedUsersRoles(groupId) {
data = JSON.parse(data);
if (xhr.status == 200) {
if (data.roles.length > 0) {
var selectedValues = [];
for (var i = 0; i < data.roles.length; i++) {
$('.roleCheckBoxes').each(
function () {
if (data.roles[i] == $(this).data('role-name')) {
$(this).attr('checked', true);
}
}
);
selectedValues.push(data.roles[i]);
}
$("#roles").val(selectedValues).trigger("change");
} else {
return;
}
@ -533,22 +522,16 @@ function listAllRoles(groupId) {
data = JSON.parse(data);
if (xhr.status == 200) {
if (data.roles.length > 0) {
var html = "<br/>";
var html = '<select id="roles" class="form-control select2" multiple="multiple">';
for (var i = 0; i < data.roles.length; i++) {
html += '<div class="wr-input-control"><label class="wr-input-control checkbox">' +
'<input class="roleCheckBoxes" type="checkbox" data-role-name="' + data.roles[i] + '" />' +
'<span class="helper" title="' + data.roles[i] + '">' + data.roles[i] +
'</span></label></div>';
$('.roleCheckBoxes').each(
function () {
if (data.roles[i] == $(this).data('role-name')) {
$(this).attr('checked', true);
}
}
);
html += '<option value="' + data.roles[i] + '">' + data.roles[i] + '</option>';
}
html += '</select>';
$("#rolesListing").html(html);
markAlreadySavedUsersRoles(groupId);
$("select.select2[multiple=multiple]").select2({
tags: false
});
} else {
$("#rolesListing").html("No roles available");
}

@ -48,6 +48,10 @@
<groupId>org.wso2.orbit.org.scannotation</groupId>
<artifactId>scannotation</artifactId>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
</dependency>
</dependencies>
<build>
@ -137,6 +141,9 @@
<bundleDef>
org.wso2.orbit.org.scannotation:scannotation:${scannotation.version}
</bundleDef>
<bundleDef>
io.swagger:swagger-annotations:${swagger.version}
</bundleDef>
</bundles>
<importFeatures>
<importFeatureDef>org.wso2.carbon.core.server:${carbon.kernel.version}</importFeatureDef>

@ -48,6 +48,10 @@
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.store</groupId>
<artifactId>org.wso2.store.sso.common</artifactId>
</dependency>
</dependencies>
<build>
@ -76,6 +80,7 @@
</includedFeatures>
<bundles>
<bundleDef>javax.servlet.jsp:javax.servlet.jsp-api</bundleDef>
<bundleDef>org.wso2.carbon.store:org.wso2.store.sso.common:${carbon.store.sso.common.version}</bundleDef>
</bundles>
</configuration>
</execution>

@ -1664,6 +1664,11 @@
<artifactId>wss4j</artifactId>
<version>${org.apache.ws.security.wso2.version}</version>
</dependency>
<dependency>
<groupId>org.wso2.carbon.store</groupId>
<artifactId>org.wso2.store.sso.common</artifactId>
<version>${carbon.store.sso.common.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
@ -2059,6 +2064,9 @@
<!-- api-mgt handler version properties -->
<org.apache.synapse.version>2.1.7-wso2v7</org.apache.synapse.version>
<org.apache.ws.security.wso2.version>1.5.11.wso2v15</org.apache.ws.security.wso2.version>
<!--carbon store version-->
<carbon.store.sso.common.version>1.4.4</carbon.store.sso.common.version>
</properties>
</project>

Loading…
Cancel
Save