Merge branch 'support-4.1.15' into 'support-4.1.15'

# Conflicts:
#   components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/util/HandlerConstants.java
#   features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/mdm-ui-config.xml
4.x.x
Pahansith Gunathilake 3 years ago
commit 963fb6d628

@ -58,6 +58,7 @@ import java.util.List;
"method", "method",
"contentType", "contentType",
"permission", "permission",
"scope",
"filterList" "filterList"
}) })
public class OperationMetadata { public class OperationMetadata {
@ -74,6 +75,9 @@ public class OperationMetadata {
@XmlElement(name = "permission") @XmlElement(name = "permission")
private String permission; private String permission;
@XmlElement(name = "scope")
private String scope;
@XmlElementWrapper(name = "filters") @XmlElementWrapper(name = "filters")
@XmlElement(name = "filter") @XmlElement(name = "filter")
private List<Filter> filterList; private List<Filter> filterList;
@ -110,6 +114,14 @@ public class OperationMetadata {
this.permission = permission; this.permission = permission;
} }
public String getScope() {
return scope;
}
public void setScope(String scope) {
this.scope = scope;
}
public List<Filter> getFilterList() { public List<Filter> getFilterList() {
return filterList; return filterList;
} }

@ -63,6 +63,7 @@ public class ConfigurationBasedFeatureManager implements FeatureManager {
private static final String OPERATION_META = "operationMeta"; private static final String OPERATION_META = "operationMeta";
private static final String CONTENT_TYPE = "contentType"; private static final String CONTENT_TYPE = "contentType";
private static final String PERMISSION = "permission"; private static final String PERMISSION = "permission";
private static final String SCOPE = "scope";
private static final String ICON = "icon"; private static final String ICON = "icon";
private static final String FILTERS = "filters"; private static final String FILTERS = "filters";
private static final String PATH_PARAMS = "pathParams"; private static final String PATH_PARAMS = "pathParams";
@ -108,6 +109,9 @@ public class ConfigurationBasedFeatureManager implements FeatureManager {
if (StringUtils.isNotEmpty(metadata.getPermission())) { if (StringUtils.isNotEmpty(metadata.getPermission())) {
operationMeta.put(PERMISSION, metadata.getPermission()); operationMeta.put(PERMISSION, metadata.getPermission());
} }
if (StringUtils.isNotEmpty(metadata.getScope())) {
operationMeta.put(SCOPE, metadata.getScope());
}
if (metadata.getFilterList() != null && metadata.getFilterList().size() > 0) { if (metadata.getFilterList() != null && metadata.getFilterList().size() > 0) {
operationMeta.put(FILTERS, metadata.getFilterList()); operationMeta.put(FILTERS, metadata.getFilterList());
} }

@ -80,5 +80,5 @@ public class HandlerConstants {
public static final String IOT_GW_HOST_ENV_VAR = "iot.gateway.host"; public static final String IOT_GW_HOST_ENV_VAR = "iot.gateway.host";
public static final String IOT_GW_HTTP_PORT_ENV_VAR = "iot.gateway.http.port"; public static final String IOT_GW_HTTP_PORT_ENV_VAR = "iot.gateway.http.port";
public static final String IOT_GW_HTTPS_PORT_ENV_VAR = "iot.gateway.https.port"; public static final String IOT_GW_HTTPS_PORT_ENV_VAR = "iot.gateway.https.port";
public static final String USER_SCOPES = "user-scopes"; public static final String USER_SCOPES = "userScopes";
} }

@ -180,6 +180,7 @@
<Scope>perm:metadata:create</Scope> <Scope>perm:metadata:create</Scope>
<Scope>perm:metadata:update</Scope> <Scope>perm:metadata:update</Scope>
<Scope>perm:android:google-account</Scope> <Scope>perm:android:google-account</Scope>
<Scope>perm:android:update-default-sim</Scope>
</Scopes> </Scopes>
<SSOConfiguration> <SSOConfiguration>
<Issuer>device-mgt</Issuer> <Issuer>device-mgt</Issuer>

Loading…
Cancel
Save