Merge pull request #715 from pasindujw/master

Android Runtime-permission policy and COSU profile configuration policy UI changes
merge-requests/1/head
Madhawa Perera 8 years ago committed by GitHub
commit c3ae8dda9b

@ -75,7 +75,11 @@ var androidOperationModule = function () {
"SET_STATUS_BAR_DISABLED": "SET_STATUS_BAR_DISABLED",
"APPLICATION_OPERATION_CODE": "APP-RESTRICTION",
"SYSTEM_UPDATE_POLICY_CODE": "SYSTEM_UPDATE_POLICY",
"KIOSK_APPS_CODE": "KIOSK_APPS"
"KIOSK_APPS_CODE": "KIOSK_APPS",
"RUNTIME_PERMISSION_POLICY_OPERATION": "runtime-permission-policy",
"RUNTIME_PERMISSION_POLICY_OPERATION_CODE": "RUNTIME_PERMISSION_POLICY",
"COSU_PROFILE_CONFIGURATION_OPERATION": "cosu-profile-configuration",
"COSU_PROFILE_CONFIGURATION_OPERATION_CODE": "COSU_PROFILE"
};
/**
@ -157,6 +161,17 @@ var androidOperationModule = function () {
};
}
break;
case androidOperationConstants["RUNTIME_PERMISSION_POLICY_OPERATION_CODE"]:
payload = {
"defaultType": operationPayload["defaultPermissionType"],
"permittedApplications": operationPayload["permittedApplications"]
};
break;
case androidOperationConstants["COSU_PROFILE_CONFIGURATION_OPERATION_CODE"]:
payload = {
"cosuProfileRestrictionStartTime": operationPayload["cosuProfileOperationRestrictionEndTime"],
"cosuProfileRestrictionEndTime": operationPayload["cosuProfileOperationRestrictionEndTime"]
}
case androidOperationConstants["KIOSK_APPS_CODE"]:
payload = {
"cosuWhitelistedApplications": operationPayload["whitelistedApplications"]
@ -325,6 +340,24 @@ var androidOperationModule = function () {
}
};
break;
case androidOperationConstants["RUNTIME_PERMISSION_POLICY_OPERATION_CODE"]:
operationType = operationTypeConstants["PROFILE"];
payload = {
"operation": {
"defaultType": operationData["defaultPermissionType"],
"permittedApplications": operationData["permittedApplications"]
}
};
break;
case androidOperationConstants["COSU_PROFILE_CONFIGURATION_OPERATION_CODE"]:
operationType = operationTypeConstants["PROFILE"];
payload = {
"operation": {
"cosuProfileRestrictionStartTime": operationData["cosuProfileOperationRestrictionStartTime"],
"cosuProfileRestrictionEndTime": operationData["cosuProfileOperationRestrictionEndTime"]
}
};
break;
case androidOperationConstants["SYSTEM_UPDATE_POLICY_CODE"]:
operationType = operationTypeConstants["PROFILE"];
if (operationData["cosuSystemUpdatePolicyType"] != "window") {

@ -33,7 +33,11 @@ var androidOperationConstants = {
"APPLICATION_OPERATION": "app-restriction",
"APPLICATION_OPERATION_CODE": "APP-RESTRICTION",
"KIOSK_APPS_CODE": "KIOSK_APPS",
"KIOSK_APPS": "cosu-whitelisted-applications"
"KIOSK_APPS": "cosu-whitelisted-applications",
"RUNTIME_PERMISSION_POLICY_OPERATION_CODE": "RUNTIME_PERMISSION_POLICY",
"RUNTIME_PERMISSION_POLICY_OPERATION": "runtime-permission-policy",
"COSU_PROFILE_CONFIGURATION_OPERATION": "cosu-profile-configuration",
"COSU_PROFILE_CONFIGURATION_OPERATION_CODE": "COSU_PROFILE"
};
/**
@ -221,6 +225,15 @@ var validatePolicyProfile = function () {
// updating validationStatusArray with validationStatus
validationStatusArray.push(validationStatus);
}
// Validating COSU PROFILE CONFIGURATION
if ($.inArray(androidOperationConstants["COSU_PROFILE_CONFIGURATION_OPERATION_CODE"], configuredOperations) != -1) {
operation = androidOperationConstants["COSU_PROFILE_CONFIGURATION_OPERATION"];
validationStatus = {
"error": false,
"okFeature": operation
};
validationStatusArray.push(validationStatus);
}
// Validating ENCRYPT_STORAGE
if ($.inArray(androidOperationConstants["ENCRYPT_STORAGE_OPERATION_CODE"], configuredOperations) != -1) {
// if ENCRYPT_STORAGE is configured
@ -233,6 +246,18 @@ var validatePolicyProfile = function () {
// updating validationStatusArray with validationStatus
validationStatusArray.push(validationStatus);
}
// Validating RUNTIME_PERMISSION
if ($.inArray(androidOperationConstants["RUNTIME_PERMISSION_POLICY_OPERATION_CODE"], configuredOperations) != -1) {
// if policy is configured
operation = androidOperationConstants["RUNTIME_PERMISSION_POLICY_OPERATION"];
// updating validationStatus
validationStatus = {
"error": false,
"okFeature": operation
};
// updating validationStatusArray with validationStatus
validationStatusArray.push(validationStatus);
}
// Validating WIFI
if ($.inArray(androidOperationConstants["WIFI_OPERATION_CODE"], configuredOperations) != -1) {
// if WIFI is configured

@ -75,6 +75,17 @@
<span id="work-profile-ok" class="has-success status-icon hidden"><i class="fw fw-success"></i></span>
<span id="work-profile-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
</a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('cosu-profile-configuration', this)">
<span class="fw-stack fw-lg">
<i class="fw fw-worker fw-stack-2x"></i>
</span>
COSU Profile Configurations
<span id="cosu-profile-configuration-configured" class="has-configured status-icon hidden"><i
class="fw fw-success"></i></span>
<span id="cosu-profile-configuration-ok" class="has-success status-icon hidden"><i
class="fw fw-success"></i></span>
<span id="cosu-profile-configuration-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
</a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('app-restriction', this)">
<span class="fw-stack fw-lg">
<i class="fw fw-application fw-stack-1x"></i>
@ -86,6 +97,18 @@
<span id="app-restriction-ok" class="has-success status-icon hidden"><i class="fw fw-success"></i></span>
<span id="app-restriction-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
</a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('runtime-permission-policy', this)">
<span class="fw-stack fw-lg">
<i class="fw fw-application fw-stack-1x"></i>
<i class="fw fw-rules fw-stack-2x"></i>
</span>
Runtime Permission Policy (COSU)
<span id="runtime-permission-policy-configured" class="has-configured status-icon hidden"><i
class="fw fw-success"></i></span>
<span id="runtime-permission-policy-ok" class="has-success status-icon hidden"><i
class="fw fw-success"></i></span>
<span id="runtime-permission-policy-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
</a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('cosu-system-update-policy', this)">
<span class="wr-hidden-operation-icon fw-stack">
<i class="fw fw-import fw-stack-2x"></i>
@ -1206,6 +1229,318 @@
</div>
</div>
</div>
<!-- runtime permission policy -->
<div class="wr-hidden-operation" data-operation="runtime-permission-policy">
<div class="panel panel-default operation-data" data-operation="runtime-permission-policy-body"
data-operation-code="RUNTIME_PERMISSION_POLICY">
<div id="runtime-permission-policy-heading" class="panel-heading" role="tab">
<h2 class="sub-title panel-title">
Runtime Permission Policy (COSU / Work Profile)
<label id="runtime-permission-policy-lbl" class="wr-input-control switch" data-toggle="collapse"
data-target="#runtime-permission-policy-body">
<input type="checkbox"/>
<span class="helper"></span>
<span class="text"></span>
</label>
</h2>
<div class="panel-title-description">
This configuration can be used to set a runtime permission policy to an Android Device.
</div>
</div>
<div id="runtime-permission-policy-body" class="panel-collapse panel-body collapse"
role="tabpanel"
aria-labelledby="runtime-permission-policy-body">
<hr/>
<div class="wr-input-control">
<label class="wr-input-label" for="runtime-permission-policy-window-start-time">
Set default runtime permission
<span class="helper" title="When an app requests a runtime permission,
this enforces whether the user needs to prompted or the permission either
automatically granted or denied.">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
</label>
<select id="runtime-permission-policy-permission-type"
class="form-control operationDataKeys"
data-key="defaultPermissionType">
<option value="1">PROMPT USER</option>
<option value="2">AUTO GRANT</option>
<option value="3">AUTO DENY</option>
</select>
<div class="wr-input-control">
<label class="wr-input-label" for="runtime-permission-applications">
<br><br>Set app-specific runtime permissions.
<span class="helper" title="Add an application and set permission policy
for a specific permission it needs.">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
</label>
<br/>
<a href="#runtime-permission-applications-grid" class="btn btn-secondary grid-input-add "
data-click-event="add-form">
<span class="icon fw-stack">
<i class="fw fw-add fw-stack-1x"></i>
<i class="fw fw-circle-outline fw-stack-2x"></i>
</span>
Add Application
</a>
<div id="runtime-permission-applications"
class="operationDataKeys grouped-array-input multi-column-key-value-pair-array"
data-key="permittedApplications" data-column-count="4">
<table class="table table-responsive table-striped">
<thead>
<tr>
<th>No:</th>
<th>Application</th>
<th>Package Name</th>
<th>Permission Name</th>
<th>Permission Type</th>
<th></th>
</tr>
</thead>
<tbody data-add-form-container="#runtime-permission-applications-grid">
<tr data-help-text="add-form">
<td colspan="5">
No entries added yet .
</td>
</tr>
</tbody>
</table>
<table class="template hidden">
<tbody data-add-form="#runtime-permission-applications-grid">
<tr data-add-form-element="clone">
<td data-title="No:">
<span class="index"></span>
</td>
<td data-title="App Name">
<input type="text" class="form-control grid-input-text" data-child-key="appName"
maxlength="50" data-default="" placeholder="[ Android Pay ]"/>
</td>
<td data-title="Package Name">
<input type="text" class="form-control grid-input-text"
data-child-key="packageName" maxlength="100" data-default=""
placeholder="[ com.google.android.pay ]"/>
</td>
<td data-title="Permission Name">
<input type="text" class="form-control grid-input-text"
data-child-key="permissionName" maxlength="100" data-default=""
placeholder="[ android.permission.NFC ]"/>
</td>
<td data-title="Runtime Permission">
<select id="runtime-permission-policy-permission-type"
class="form-control operationDataKeys"
data-child-key="permissionType" data-default="0">
<option value="1">PROMPT USER</option>
<option value="2" selected="selected">AUTO GRANT</option>
<option value="3">AUTO DENY</option>
</select>
</td>
<td>
<span class="list-group-item-actions">
<a href="#runtime-permission-applications-grid" class="grid-input-remove"
data-click-event="remove-form">
<span class="fw-stack helper" title="Remove Entry">
<i class="fw fw-circle-outline fw-stack-2x"></i>
<i class="fw fw-delete fw-stack-1x"></i>
</span>
</a>
</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<br>
<ul class="message message-info">
<i class="icon fw fw-info"></i>
Already granted or denied permissions are not affected by this policy.
<br>
<i class="icon fw fw-info"></i>
Permissions can be granted or revoked only for applications built with a Target SDK Version of Android Marshmallow or later.
</ul>
</div>
</div>
</div>
</div>
<!--COSU profile configuration-->
<div class="wr-hidden-operation" data-operation="cosu-profile-configuration">
<div class="panel panel-default operation-data" data-operation="cosu-profile-configuration"
data-operation-code="COSU_PROFILE">
<div id="cosu-profile-configuration-heading" class="panel-heading" role="tab">
<h2 class="sub-title panel-title">
COSU Profile Configuration
<label class="wr-input-control switch" data-toggle="collapse"
data-target="#cosu-profile-configuration-body">
<input type="checkbox"/>
<span class="helper"></span>
<span class="text"></span>
</label>
</h2>
<div class="panel-title-description">
This policy can be used to configure the profile of COSU Devices.
</div>
</div>
<div id="cosu-profile-configuration-body" class="panel-collapse panel-body collapse"
role="tabpanel"
aria-labelledby="cosu-profile-configuration-body">
<hr/>
<div id="cosu-profile-configuration-feature-error-msg" class="alert alert-danger hidden" role="alert">
<i class="icon fw fw-error"></i><span></span>
</div>
<form class="form-horizontal">
<div class="form-group">
<div class="col-sm-12 form-inline">
<label class="control-label">Restrict device operation time</label>
<label class="switch">
<input type="checkbox" id="gridGuideToggle" data-toggle="collapse"
data-target="#cosu-profile-restrict-operation-time" >
<span class="helper"></span>
</label>
</div>
</div>
<div id="cosu-profile-restrict-operation-time" class="panel-collapse panel-body collapse"
role="tabpanel">
<div class="wr-input-control">
<label class="wr-input-label" for="cosu-profile-configuration-start-time">
Start Time
<span class="helper" title="Start time for the device">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
</label>
<select id="cosu-profile-configuration-start-time"
class="form-control operationDataKeys"
data-key="cosuProfileOperationRestrictionStartTime">
<option value="1440">12:00 Midnight</option>
<option value="30">12:30 AM</option>
<option value="60">1:00 AM</option>
<option value="90">1:30 AM</option>
<option value="120">2:00 AM</option>
<option value="150">2:30 AM</option>
<option value="180">3:00 AM</option>
<option value="210">3:30 AM</option>
<option value="240">4:00 AM</option>
<option value="270">4:30 AM</option>
<option value="300">5:00 AM</option>
<option value="330">5:30 AM</option>
<option value="360">6:00 AM</option>
<option value="390">6:30 AM</option>
<option value="420">7:00 AM</option>
<option value="450">7:30 AM</option>
<option value="480">8:00 AM</option>
<option value="510">8:30 AM</option>
<option value="540">9:00 AM</option>
<option value="570">9:30 AM</option>
<option value="600">10:00 AM</option>
<option value="630">10:30 AM</option>
<option value="660">11:00 AM</option>
<option value="690">11:30 AM</option>
<option value="720">12:00 noon</option>
<option value="750">12:30 PM</option>
<option value="780">1:00 PM</option>
<option value="810">1:30 PM</option>
<option value="840">2:00 PM</option>
<option value="870">2:30 PM</option>
<option value="900">3:00 PM</option>
<option value="930">3:30 PM</option>
<option value="960">4:00 PM</option>
<option value="990">4:30 PM</option>
<option value="1020">5:00 PM</option>
<option value="1050">5:30 PM</option>
<option value="1080">6:00 PM</option>
<option value="1110">6:30 PM</option>
<option value="1140">7:00 PM</option>
<option value="1170">7:30 PM</option>
<option value="1200">8:00 PM</option>
<option value="1230">8:30 PM</option>
<option value="1260">9:00 PM</option>
<option value="1290">9:30 PM</option>
<option value="1320">10:00 PM</option>
<option value="1350">10:30 PM</option>
<option value="1380">11:00 PM</option>
<option value="1410">11:30 PM</option>
</select>
</div>
<div class="wr-input-control">
<label class="wr-input-label">
End Time
<span class="helper" title="Lock-down time for the device">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
</label>
<select id="cosu-profile-configuration-end-time"
class="form-control operationDataKeys"
data-key="cosuProfileOperationRestrictionEndTime" data-default="0">
<option value="1440">12:00 Midnight</option>
<option value="30">12:30 AM</option>
<option value="60">1:00 AM</option>
<option value="90">1:30 AM</option>
<option value="120">2:00 AM</option>
<option value="150">2:30 AM</option>
<option value="180">3:00 AM</option>
<option value="210">3:30 AM</option>
<option value="240">4:00 AM</option>
<option value="270">4:30 AM</option>
<option value="300">5:00 AM</option>
<option value="330">5:30 AM</option>
<option value="360">6:00 AM</option>
<option value="390">6:30 AM</option>
<option value="420">7:00 AM</option>
<option value="450">7:30 AM</option>
<option value="480">8:00 AM</option>
<option value="510">8:30 AM</option>
<option value="540">9:00 AM</option>
<option value="570">9:30 AM</option>
<option value="600">10:00 AM</option>
<option value="630">10:30 AM</option>
<option value="660">11:00 AM</option>
<option value="690">11:30 AM</option>
<option value="720">12:00 noon</option>
<option value="750">12:30 PM</option>
<option value="780">1:00 PM</option>
<option value="810">1:30 PM</option>
<option value="840">2:00 PM</option>
<option value="870">2:30 PM</option>
<option value="900">3:00 PM</option>
<option value="930">3:30 PM</option>
<option value="960">4:00 PM</option>
<option value="990">4:30 PM</option>
<option value="1020">5:00 PM</option>
<option value="1050">5:30 PM</option>
<option value="1080">6:00 PM</option>
<option value="1110">6:30 PM</option>
<option value="1140">7:00 PM</option>
<option value="1170">7:30 PM</option>
<option value="1200">8:00 PM</option>
<option value="1230">8:30 PM</option>
<option value="1260">9:00 PM</option>
<option value="1290">9:30 PM</option>
<option value="1320">10:00 PM</option>
<option value="1350">10:30 PM</option>
<option value="1380">11:00 PM</option>
<option value="1410">11:30 PM</option>
</select>
</div>
<div>
<ul class="message message-info">
<i class="icon fw fw-info"></i>
<a id="cosu-profile-configuration-select-msg">
Device will be operable only during the above period.
</a>
</ul>
</div>
</div>
</form>
</div>
</div>
</div>
<!--COSU profile configuration-->
<!-- cosu-system-update-policy -->
<div class="wr-hidden-operation" data-operation="cosu-system-update-policy">
<div class="panel panel-default operation-data" data-operation="cosu-system-update-policy-body"

@ -58,6 +58,16 @@
<span id="work-profile-ok" class="has-success status-icon hidden"><i class="fw fw-success"></i></span>
<span id="work-profile-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
</a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('cosu-profile-configuration', this)">
<span class="fw-stack fw-lg">
<i class="fw fw-worker fw-stack-2x"></i>
</span>
COSU Profile Configurations
<span id="cosu-profile-configuration-configured" class="has-configured status-icon hidden"><i
class="fw fw-success"></i></span>
<span id="cosu-profile-configuration-ok" class="has-success status-icon hidden"><i class="fw fw-success"></i></span>
<span id="cosu-profile-configuration-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
</a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('app-restriction', this)">
<span class="fw-stack fw-lg">
<i class="fw fw-application fw-stack-1x"></i>
@ -69,6 +79,18 @@
<span id="app-restriction-ok" class="has-success status-icon hidden"><i class="fw fw-success"></i></span>
<span id="app-restriction-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
</a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('runtime-permission-policy', this)">
<span class="fw-stack fw-lg">
<i class="fw fw-application fw-stack-1x"></i>
<i class="fw fw-block fw-stack-2x"></i>
</span>
Runtime Permission Policy (COSU)
<span id="runtime-permission-policy-configured" class="has-configured status-icon hidden"><i
class="fw fw-success"></i></span>
<span id="runtime-permission-policy-ok" class="has-success status-icon hidden"><i
class="fw fw-success"></i></span>
<span id="runtime-permission-policy-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
</a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('cosu-system-update-policy', this)" class="hide">
<span class="wr-hidden-operation-icon fw-stack">
<i class="fw fw-import fw-stack-2x"></i>
@ -922,6 +944,181 @@
</div>
</div>
<!-- /wi-fi -->
<!--COSU profile configuration-->
<div class="wr-hidden-operation" data-operation="cosu-profile-configuration">
<div class="panel panel-default operation-data" data-operation="cosu-profile-configuration"
data-operation-code="COSU_PROFILE">
<div id="cosu-profile-configuration-heading" class="panel-heading" role="tab">
<h2 class="sub-title panel-title">
COSU Profile Configuration
<label class="wr-input-control switch hidden"
data-toggle="collapse"
data-target="#cosu-profile-configuration-body">
<input type="checkbox"/>
<span class="helper"></span>
<span class="text"></span>
</label>
</h2>
<div class="panel-title-description">
This policy can be used to configure the profile of COSU Devices.
</div>
</div>
<div id="cosu-profile-configuration-body" class="panel-collapse panel-body collapse"
role="tabpanel"
aria-labelledby="cosu-profile-configuration-body">
<hr/>
<div id="cosu-profile-configuration-feature-error-msg" class="alert alert-danger hidden" role="alert">
<i class="icon fw fw-error"></i><span></span>
</div>
<form class="form-horizontal">
<div class="form-group" >
<div class="col-sm-12 form-inline">
<label class="control-label">Restrict device operation time</label>
<label class="switch">
<input type="checkbox" id="gridGuideToggle" data-toggle="collapse"
data-target="#cosu-profile-restrict-operation-time" >
<span class="helper"></span>
</label>
</div>
</div>
<div id="cosu-profile-restrict-operation-time" class="panel-collapse panel-body collapse"
role="tabpanel">
<div class="wr-input-control">
<label class="wr-input-label" for="cosu-profile-configuration-start-time">
Start Time
<span class="helper" title="Start time for the device">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
</label>
<select id="cosu-profile-configuration-start-time"
class="form-control operationDataKeys"
data-key="cosuProfileOperationRestrictionStartTime" disabled>
<option value="1440">12:00 Midnight</option>
<option value="30">12:30 AM</option>
<option value="60">1:00 AM</option>
<option value="90">1:30 AM</option>
<option value="120">2:00 AM</option>
<option value="150">2:30 AM</option>
<option value="180">3:00 AM</option>
<option value="210">3:30 AM</option>
<option value="240">4:00 AM</option>
<option value="270">4:30 AM</option>
<option value="300">5:00 AM</option>
<option value="330">5:30 AM</option>
<option value="360">6:00 AM</option>
<option value="390">6:30 AM</option>
<option value="420">7:00 AM</option>
<option value="450">7:30 AM</option>
<option value="480">8:00 AM</option>
<option value="510">8:30 AM</option>
<option value="540">9:00 AM</option>
<option value="570">9:30 AM</option>
<option value="600">10:00 AM</option>
<option value="630">10:30 AM</option>
<option value="660">11:00 AM</option>
<option value="690">11:30 AM</option>
<option value="720">12:00 noon</option>
<option value="750">12:30 PM</option>
<option value="780">1:00 PM</option>
<option value="810">1:30 PM</option>
<option value="840">2:00 PM</option>
<option value="870">2:30 PM</option>
<option value="900">3:00 PM</option>
<option value="930">3:30 PM</option>
<option value="960">4:00 PM</option>
<option value="990">4:30 PM</option>
<option value="1020">5:00 PM</option>
<option value="1050">5:30 PM</option>
<option value="1080">6:00 PM</option>
<option value="1110">6:30 PM</option>
<option value="1140">7:00 PM</option>
<option value="1170">7:30 PM</option>
<option value="1200">8:00 PM</option>
<option value="1230">8:30 PM</option>
<option value="1260">9:00 PM</option>
<option value="1290">9:30 PM</option>
<option value="1320">10:00 PM</option>
<option value="1350">10:30 PM</option>
<option value="1380">11:00 PM</option>
<option value="1410">11:30 PM</option>
</select>
</div>
<div class="wr-input-control">
<label class="wr-input-label" for="cosu-profile-configuration-end-time">
End Time
<span class="helper" title="Lock-down time for the device">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
</label>
<select id="cosu-profile-configuration-end-time"
class="form-control operationDataKeys"
data-key="cosuProfileOperationRestrictionEndTime" data-default="0" disabled>
<option value="1440">12:00 Midnight</option>
<option value="30">12:30 AM</option>
<option value="60">1:00 AM</option>
<option value="90">1:30 AM</option>
<option value="120">2:00 AM</option>
<option value="150">2:30 AM</option>
<option value="180">3:00 AM</option>
<option value="210">3:30 AM</option>
<option value="240">4:00 AM</option>
<option value="270">4:30 AM</option>
<option value="300">5:00 AM</option>
<option value="330">5:30 AM</option>
<option value="360">6:00 AM</option>
<option value="390">6:30 AM</option>
<option value="420">7:00 AM</option>
<option value="450">7:30 AM</option>
<option value="480">8:00 AM</option>
<option value="510">8:30 AM</option>
<option value="540">9:00 AM</option>
<option value="570">9:30 AM</option>
<option value="600">10:00 AM</option>
<option value="630">10:30 AM</option>
<option value="660">11:00 AM</option>
<option value="690">11:30 AM</option>
<option value="720">12:00 noon</option>
<option value="750">12:30 PM</option>
<option value="780">1:00 PM</option>
<option value="810">1:30 PM</option>
<option value="840">2:00 PM</option>
<option value="870">2:30 PM</option>
<option value="900">3:00 PM</option>
<option value="930">3:30 PM</option>
<option value="960">4:00 PM</option>
<option value="990">4:30 PM</option>
<option value="1020">5:00 PM</option>
<option value="1050">5:30 PM</option>
<option value="1080">6:00 PM</option>
<option value="1110">6:30 PM</option>
<option value="1140">7:00 PM</option>
<option value="1170">7:30 PM</option>
<option value="1200">8:00 PM</option>
<option value="1230">8:30 PM</option>
<option value="1260">9:00 PM</option>
<option value="1290">9:30 PM</option>
<option value="1320">10:00 PM</option>
<option value="1350">10:30 PM</option>
<option value="1380">11:00 PM</option>
<option value="1410">11:30 PM</option>
</select>
</div>
<div>
<ul class="message message-info">
<i class="icon fw fw-info"></i>
<a id="cosu-profile-configuration-select-msg">
Device will be operable only during the above period.
</a>
</ul>
</div>
</div>
</form>
</div>
</div>
</div>
<!--COSU profile configuration-->
<!--app-restriction-->
<div class="wr-hidden-operation" data-operation="app-restriction">
<div class="panel panel-default operation-data" data-operation="app-restriction"
@ -1315,6 +1512,142 @@
</div>
</div>
</div>
<!-- runtime permission policy -->
<div class="wr-hidden-operation" data-operation="runtime-permission-policy">
<div class="panel panel-default operation-data" data-operation="runtime-permission-policy"
data-operation-code="RUNTIME_PERMISSION_POLICY">
<div id="runtime-permission-policy-heading" class="panel-heading" role="tab">
<h2 class="sub-title panel-title">
Runtime Permission Policy
<label class="wr-input-control switch hidden"
data-toggle="collapse"
data-target="#runtime-permission-policy-body">
<input type="checkbox"/>
<span class="helper"></span>
<span class="text"></span>
</label>
</h2>
<div class="panel-title-description">
This configuration can be used to set a runtime permission policy to an Android Device.
</div>
</div>
<div id="runtime-permission-policy-body" class="panel-collapse panel-body collapse"
role="tabpanel"
aria-labelledby="runtime-permission-policy-body">
<hr/>
<div id="runtime-permission-policy-feature-error-msg" class="alert alert-danger hidden" role="alert">
<i class="icon fw fw-error"></i><span></span>
</div>
<div class="wr-input-control">
<label class="wr-input-label" for="runtime-permission-policy-window-start-time">
Set default runtime permission
<span class="helper" title="When an app requests a runtime permission,
this enforces whether the user needs to prompted or the permission either
automatically granted or denied.">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
</label>
<select id="runtime-permission-policy-permission-type"
class="form-control operationDataKeys"
data-key="defaultPermissionType" disabled>
<option value="1">PROMPT USER</option>
<option value="2">AUTO GRANT</option>
<option value="3">AUTO DENY</option>
</select>
<div class="wr-input-control">
<label class="wr-input-label" for="runtime-permission-applications">
<br><br>Set app-specific runtime permissions.
<span class="helper" title="Add an application and set permission policy
for a specific permission it needs.">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
</label>
<br/>
<div id="runtime-permission-applications"
class="operationDataKeys grouped-array-input multi-column-key-value-pair-array"
data-key="permittedApplications" data-column-count="4" disabled>
<table class="table table-responsive table-striped">
<thead>
<tr>
<th>No:</th>
<th>Application</th>
<th>Package Name</th>
<th>Permission Name</th>
<th>Permission Type</th>
<th></th>
</tr>
</thead>
<tbody data-add-form-container="#runtime-permission-applications-grid">
<tr data-help-text="add-form">
<td colspan="5">
No entries added yet .
</td>
</tr>
</tbody>
</table>
<table class = "template hidden" aria-disabled="true">
<tbody data-add-form="#runtime-permission-applications-grid">
<tr data-add-form-element="clone">
<td data-title="No:">
<span class="index"></span>
</td>
<td data-title="App Name">
<input type="text" class="form-control grid-input-text" data-child-key="appName"
maxlength="50" data-default="" placeholder="[ Android Pay ]"/>
</td>
<td data-title="Package Name">
<input type="text" class="form-control grid-input-text"
data-child-key="packageName" maxlength="100" data-default=""
placeholder="[ com.google.android.pay ]"/>
</td>
<td data-title="Permission Name">
<input type="text" class="form-control grid-input-text"
data-child-key="permissionName" maxlength="100" data-default=""
placeholder="[ android.permission.NFC ]"/>
</td>
<td data-title="Runtime Permission">
<select id="runtime-permission-policy-permission-type"
class="form-control operationDataKeys"
data-child-key="permissionType">
<option value="1">PROMPT USER</option>
<option value="2">AUTO GRANT</option>
<option value="3">AUTO DENY</option>
</select>
</td>
<td>
<span class="list-group-item-actions">
<a href="#runtime-permission-applications-grid" class="grid-input-remove"
data-click-event="remove-form">
<span class="fw-stack helper" title="Remove Entry">
<i class="fw fw-circle-outline fw-stack-2x"></i>
<i class="fw fw-delete fw-stack-1x"></i>
</span>
</a>
</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<br>
<ul class="message message-info">
<i class="icon fw fw-info"></i>
Already granted or denied permissions are not affected by this policy.
<br>
<i class="icon fw fw-info"></i>
Permissions can be granted or revoked only for applications built with a Target SDK Version of Android Marshmallow or later.
</ul>
</div>
</div>
</div>
</div>
<!-- runtime permission policy -->
<!-- cosu-system-update-policy -->
<div class="wr-hidden-operation hide" data-operation="cosu-system-update-policy">
<div class="panel panel-default operation-data" data-operation="cosu-system-update-policy"

@ -76,6 +76,17 @@
<span id="work-profile-ok" class="has-success status-icon hidden"><i class="fw fw-success"></i></span>
<span id="work-profile-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
</a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('cosu-profile-configuration', this)">
<span class="fw-stack fw-lg">
<i class="fw fw-worker fw-stack-2x"></i>
</span>
COSU Profile Configurations
<span id="cosu-profile-configuration-configured" class="has-configured status-icon hidden"><i
class="fw fw-success"></i></span>
<span id="cosu-profile-configuration-ok" class="has-success status-icon hidden"><i
class="fw fw-success"></i></span>
<span id="cosu-profile-configuration-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
</a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('app-restriction', this)">
<span class="fw-stack fw-lg">
<i class="fw fw-application fw-stack-1x"></i>
@ -88,6 +99,18 @@
class="fw fw-success"></i></span>
<span id="app-restriction-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
</a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('runtime-permission-policy', this)">
<span class="fw-stack fw-lg">
<i class="fw fw-application fw-stack-1x"></i>
<i class="fw fw-rules fw-stack-2x"></i>
</span>
Runtime Permission Policy
<span id="runtime-permission-policy-configured" class="has-configured status-icon hidden"><i
class="fw fw-success"></i></span>
<span id="runtime-permission-policy-ok" class="has-success status-icon hidden"><i
class="fw fw-success"></i></span>
<span id="runtime-permission-policy-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
</a>
<a href="javascript:void(0)" class="worker-profile"
onclick="showAdvanceOperation('cosu-system-update-policy', this)">
<span class="wr-hidden-operation-icon fw-stack">
@ -270,8 +293,6 @@
</div>
</div>
</div>
<!-- /passcode-policy -->
<!-- camera -->
<div class="wr-hidden-operation" data-operation="camera">
<div class="panel panel-default operation-data" data-operation="camera" data-operation-code="CAMERA">
@ -1041,6 +1062,178 @@
</div>
<!--/app-restriction-->
<!--COSU profile configuration-->
<div class="wr-hidden-operation" data-operation="cosu-profile-configuration">
<div class="panel panel-default operation-data" data-operation="cosu-profile-configuration"
data-operation-code="COSU_PROFILE">
<div id="cosu-profile-configuration-heading" class="panel-heading" role="tab">
<h2 class="sub-title panel-title">
COSU Profile Configuration
<label class="wr-input-control switch" data-toggle="collapse"
data-target="#cosu-profile-configuration-body">
<input type="checkbox"/>
<span class="helper"></span>
<span class="text"></span>
</label>
</h2>
<div class="panel-title-description">
This policy can be used to configure the profile of COSU Devices.
</div>
</div>
<div id="cosu-profile-configuration-body" class="panel-collapse panel-body collapse" role="tabpanel"
aria-labelledby="cosu-profile-configuration-body">
<hr/>
<div id="cosu-profile-configuration-feature-error-msg" class="alert alert-danger hidden" role="alert">
<i class="icon fw fw-error"></i><span></span>
</div>
<form class="form-horizontal">
<div class="form-group">
<div class="col-sm-12 form-inline">
<label class="control-label">Restrict device operation time</label>
<label class="switch">
<input type="checkbox" id="gridGuideToggle" data-toggle="collapse"
data-target="#cosu-profile-restrict-operation-time" >
<span class="helper"></span>
</label>
</div>
</div>
<div id="cosu-profile-restrict-operation-time" class="panel-collapse panel-body collapse"
role="tabpanel">
<div class="wr-input-control">
<label class="wr-input-label">
Start Time
<span class="helper" title="Start time for the device">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
</label>
<select id="cosu-profile-configuration-start-time"
class="form-control operationDataKeys"
data-key="cosuProfileOperationRestrictionStartTime" data-default="0">
<option value="1440">12:00 Midnight</option>
<option value="30">12:30 AM</option>
<option value="60">1:00 AM</option>
<option value="90">1:30 AM</option>
<option value="120">2:00 AM</option>
<option value="150">2:30 AM</option>
<option value="180">3:00 AM</option>
<option value="210">3:30 AM</option>
<option value="240">4:00 AM</option>
<option value="270">4:30 AM</option>
<option value="300">5:00 AM</option>
<option value="330">5:30 AM</option>
<option value="360">6:00 AM</option>
<option value="390">6:30 AM</option>
<option value="420">7:00 AM</option>
<option value="450">7:30 AM</option>
<option value="480" selected="selected">8:00 AM</option>
<option value="510">8:30 AM</option>
<option value="540">9:00 AM</option>
<option value="570">9:30 AM</option>
<option value="600">10:00 AM</option>
<option value="630">10:30 AM</option>
<option value="660">11:00 AM</option>
<option value="690">11:30 AM</option>
<option value="720">12:00 noon</option>
<option value="750">12:30 PM</option>
<option value="780">1:00 PM</option>
<option value="810">1:30 PM</option>
<option value="840">2:00 PM</option>
<option value="870">2:30 PM</option>
<option value="900">3:00 PM</option>
<option value="930">3:30 PM</option>
<option value="960">4:00 PM</option>
<option value="990">4:30 PM</option>
<option value="1020">5:00 PM</option>
<option value="1050">5:30 PM</option>
<option value="1080">6:00 PM</option>
<option value="1110">6:30 PM</option>
<option value="1140">7:00 PM</option>
<option value="1170">7:30 PM</option>
<option value="1200">8:00 PM</option>
<option value="1230">8:30 PM</option>
<option value="1260">9:00 PM</option>
<option value="1290">9:30 PM</option>
<option value="1320">10:00 PM</option>
<option value="1350">10:30 PM</option>
<option value="1380">11:00 PM</option>
<option value="1410">11:30 PM</option>
</select>
</div>
<div class="wr-input-control">
<label class="wr-input-label">
End Time
<span class="helper" title="Lock-down time for the device">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
</label>
<select id="cosu-profile-configuration-end-time"
class="form-control operationDataKeys"
data-key="cosuProfileOperationRestrictionEndTime" data-default="0">
<option value="1440">12:00 Midnight</option>
<option value="30">12:30 AM</option>
<option value="60">1:00 AM</option>
<option value="90">1:30 AM</option>
<option value="120">2:00 AM</option>
<option value="150">2:30 AM</option>
<option value="180">3:00 AM</option>
<option value="210">3:30 AM</option>
<option value="240">4:00 AM</option>
<option value="270">4:30 AM</option>
<option value="300">5:00 AM</option>
<option value="330">5:30 AM</option>
<option value="360">6:00 AM</option>
<option value="390">6:30 AM</option>
<option value="420">7:00 AM</option>
<option value="450">7:30 AM</option>
<option value="480">8:00 AM</option>
<option value="510">8:30 AM</option>
<option value="540">9:00 AM</option>
<option value="570">9:30 AM</option>
<option value="600">10:00 AM</option>
<option value="630">10:30 AM</option>
<option value="660">11:00 AM</option>
<option value="690">11:30 AM</option>
<option value="720">12:00 noon</option>
<option value="750">12:30 PM</option>
<option value="780">1:00 PM</option>
<option value="810">1:30 PM</option>
<option value="840">2:00 PM</option>
<option value="870">2:30 PM</option>
<option value="900">3:00 PM</option>
<option value="930">3:30 PM</option>
<option value="960">4:00 PM</option>
<option value="990">4:30 PM</option>
<option value="1020" selected="selected">5:00 PM</option>
<option value="1050">5:30 PM</option>
<option value="1080">6:00 PM</option>
<option value="1110">6:30 PM</option>
<option value="1140">7:00 PM</option>
<option value="1170">7:30 PM</option>
<option value="1200">8:00 PM</option>
<option value="1230">8:30 PM</option>
<option value="1260">9:00 PM</option>
<option value="1290">9:30 PM</option>
<option value="1320">10:00 PM</option>
<option value="1350">10:30 PM</option>
<option value="1380">11:00 PM</option>
<option value="1410">11:30 PM</option>
</select>
</div>
<div>
<ul class="message message-info">
<i class="icon fw fw-info"></i>
<a id="cosu-profile-configuration-select-msg">
Device will be operable only during the above period.
</a>
</ul>
</div>
</div>
</form>
</div>
</div>
</div>
<!--COSU profile configuration-->
<!-- VPN -->
<div class="wr-hidden-operation" data-operation="vpn">
<div class="panel panel-default operation-data" data-operation="vpn" data-operation-code="VPN">
@ -1127,8 +1320,7 @@
</label>
</h2>
<div class="panel-title-description">
Configure the settings to access mobile applications via the Android Work Profile.
</div>
Configure these settings to manage the applications in the work profile. </div>
</div>
<div id="work-profile-policy-body" class="panel-collapse panel-body collapse" role="tabpanel"
aria-labelledby="work-profile-policy-body">
@ -1161,12 +1353,12 @@
<div class="wr-input-control">
<label class="wr-input-label" for="work-profile-policy-enable-system-apps">
Enable System Apps
<span class="helper" title="The set of system apps needed to be added to the work-profile">
<span class="helper" title="The system applications that needs to enabled in the work-profile.">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
<br>
( Should be exact package names seperated by commas. Ex: com.google.android.apps.maps,
com.google.android.calculator )
(Provide the exact package name. Multiple package names can be provided as comma separated values. Ex: com.google.android.apps.maps,
com.google.android.calculator)
</label>
<textarea id="workProfilePolicyEnableSystemApps" type="text"
class="form-control operationDataKeys" rows="4"
@ -1175,12 +1367,12 @@
<div class="wr-input-control">
<label class="wr-input-label" for="work-profile-policy-hide-system-apps">
Hide System Apps
<span class="helper" title="The set of system apps needed to be hide in the work-profile">
<span class="helper" title="The system applications that needs to be hidden in the work-profile.">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
<br>
( Should be exact package names seperated by commas. Ex: com.google.android.apps.maps,
com.google.android.calculator )
(Provide the exact package name. Multiple package names can be provided as comma separated values. Ex: com.google.android.apps.maps,
com.google.android.calculator)
</label>
<textarea id="work-profile-policy-hide-system-apps" class="form-control operationDataKeys"
rows="4" data-key="workProfilePolicyHideSystemApps" placeholder=""></textarea>
@ -1188,12 +1380,11 @@
<div class="wr-input-control">
<label class="wr-input-label" for="work-profile-policy-unhide-system-apps">
Unhide System Apps
<span class="helper" title="The set of system apps needed to be unhide in the work-profile">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
<span class="helper" title=" The system applications that needs to be shown in the work-profile."></span>
</span>
<br>
( Should be exact package names seperated by commas. Ex: com.google.android.apps.maps,
com.google.android.calculator )
(Provide the exact package name. Multiple package names can be provided as comma separated values. Ex: com.google.android.apps.maps,
com.google.android.calculator)
</label>
<textarea id="work-profile-policy-unhide-system-apps" class="form-control operationDataKeys"
rows="4" data-key="workProfilePolicyUnhideSystemApps" placeholder=""></textarea>
@ -1202,12 +1393,12 @@
<label class="wr-input-label" for="work-profile-policy-install-playstore-apps">
Enable Google Play Store Apps
<span class="helper"
title="The set of apps needed to be installed from Google Playstore to work-profile">
title="The applications that needs to be downloaded and installed from Google play store to the work-profile.">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
<br>
( Should be exact package names seperated by commas. Ex: com.google.android.apps.maps,
com.google.android.calculator )
(Provide the exact package name. Multiple package names can be provided as comma separated values. Ex: com.google.android.apps.maps,
com.google.android.calculator)
</label>
<textarea id="work-profile-policy-install-playstore-apps" class="form-control operationDataKeys"
rows="4" data-key="workProfilePolicyEnablePlaystoreApps" placeholder=""></textarea>
@ -1215,6 +1406,145 @@
</div>
</div>
</div>
<!-- runtime permission policy -->
<div class="wr-hidden-operation" data-operation="runtime-permission-policy">
<div class="panel panel-default operation-data" data-operation="runtime-permission-policy-body"
data-operation-code="RUNTIME_PERMISSION_POLICY">
<div id="runtime-permission-policy-heading" class="panel-heading" role="tab">
<h2 class="sub-title panel-title">
Runtime Permission Policy (COSU / Work Profile)
<label id="runtime-permission-policy-lbl" class="wr-input-control switch" data-toggle="collapse"
data-target="#runtime-permission-policy-body">
<input type="checkbox"/>
<span class="helper"></span>
<span class="text"></span>
</label>
</h2>
<div class="panel-title-description">
This configuration can be used to set a runtime permission policy to an Android Device.
</div>
</div>
<div id="runtime-permission-policy-body" class="panel-collapse panel-body collapse"
role="tabpanel"
aria-labelledby="runtime-permission-policy-body">
<hr/>
<div class="wr-input-control">
<label class="wr-input-label" for="runtime-permission-policy-window-start-time">
Set default runtime permission
<span class="helper" title="When an app requests a runtime permission,
this enforces whether the user needs to prompted or the permission either
automatically granted or denied.">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
</label>
<select id="runtime-permission-policy-permission-type"
class="form-control operationDataKeys"
data-key="defaultPermissionType" data-default="0">
<option value="1" selected="selected">PROMPT USER</option>
<option value="2">AUTO GRANT</option>
<option value="3">AUTO DENY</option>
</select>
<div class="wr-input-control">
<label class="wr-input-label" for="runtime-permission-applications">
<br><br>Set app-specific runtime permissions.
<span class="helper" title="Add an application and set permission policy
for a specific permission it needs.">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
</label>
<br/>
<a href="#runtime-permission-applications-grid" class="btn btn-secondary grid-input-add "
data-click-event="add-form">
<span class="icon fw-stack">
<i class="fw fw-add fw-stack-1x"></i>
<i class="fw fw-circle-outline fw-stack-2x"></i>
</span>
Add Application
</a>
<div id="runtime-permission-applications"
class="operationDataKeys grouped-array-input multi-column-key-value-pair-array"
data-key="permittedApplications" data-column-count="4">
<table class="table table-responsive table-striped">
<thead>
<tr>
<th>No:</th>
<th>Application</th>
<th>Package Name</th>
<th>Permission Name</th>
<th>Permission Type</th>
<th></th>
</tr>
</thead>
<tbody data-add-form-container="#runtime-permission-applications-grid">
<tr data-help-text="add-form">
<td colspan="5">
No entries added yet .
</td>
</tr>
</tbody>
</table>
<table class="template hidden">
<tbody data-add-form="#runtime-permission-applications-grid">
<tr data-add-form-element="clone">
<td data-title="No:">
<span class="index"></span>
</td>
<td data-title="App Name">
<input type="text" class="form-control grid-input-text" data-child-key="appName"
maxlength="50" data-default="" placeholder="[ Android Pay ]"/>
</td>
<td data-title="Package Name">
<input type="text" class="form-control grid-input-text"
data-child-key="packageName" maxlength="100" data-default=""
placeholder="[ com.google.android.pay ]"/>
</td>
<td data-title="Permission Name">
<input type="text" class="form-control grid-input-text"
data-child-key="permissionName" maxlength="100" data-default=""
placeholder="[ android.permission.NFC ]"/>
</td>
<td data-title="Runtime Permission">
<select id="runtime-permission-policy-permission-type"
class="form-control operationDataKeys"
data-child-key="permissionType" data-default="0">
<option value="1">PROMPT USER</option>
<option value="2" selected="selected">AUTO GRANT</option>
<option value="3">AUTO DENY</option>
</select>
</td>
<td>
<span class="list-group-item-actions">
<a href="#runtime-permission-applications-grid" class="grid-input-remove"
data-click-event="remove-form">
<span class="fw-stack helper" title="Remove Entry">
<i class="fw fw-circle-outline fw-stack-2x"></i>
<i class="fw fw-delete fw-stack-1x"></i>
</span>
</a>
</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<br>
<ul class="message message-info">
<i class="icon fw fw-info"></i>
Already granted or denied permissions are not affected by this policy.
<br>
<i class="icon fw fw-info"></i>
Permissions can be granted or revoked only for applications built with a Target SDK Version of Android Marshmallow or later.
</ul>
</div>
</div>
</div>
</div>
<!-- cosu-system-update-policy -->
<div class="wr-hidden-operation" data-operation="cosu-system-update-policy">
<div class="panel panel-default operation-data" data-operation="cosu-system-update-policy-body"

Loading…
Cancel
Save