added roles to the scopes

merge-requests/184/head
Amalka Subasinghe 3 years ago
parent 36d897072e
commit 86737eaa1b

@ -71,156 +71,182 @@ import java.util.List;
name = "Lock Device", name = "Lock Device",
description = "Hard lock own device", description = "Hard lock own device",
key = "perm:android:lock-devices", key = "perm:android:lock-devices",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/lock"} permissions = {"/device-mgt/devices/owning-device/operations/android/lock"}
), ),
@Scope( @Scope(
name = "Unlock Device", name = "Unlock Device",
description = "Unlock permanently locked device", description = "Unlock permanently locked device",
key = "perm:android:unlock-devices", key = "perm:android:unlock-devices",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/unlock"} permissions = {"/device-mgt/devices/owning-device/operations/android/unlock"}
), ),
@Scope( @Scope(
name = "Get Location", name = "Get Location",
description = "Request device location coordinates", description = "Request device location coordinates",
key = "perm:android:location", key = "perm:android:location",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/location"} permissions = {"/device-mgt/devices/owning-device/operations/android/location"}
), ),
@Scope( @Scope(
name = "Clear Password", name = "Clear Password",
description = "Clear the password on Android devices", description = "Clear the password on Android devices",
key = "perm:android:clear-password", key = "perm:android:clear-password",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/clear-password"} permissions = {"/device-mgt/devices/owning-device/operations/android/clear-password"}
), ),
@Scope( @Scope(
name = "Control Camera", name = "Control Camera",
description = "Enabling or Disabling the Camera on Android Devices", description = "Enabling or Disabling the Camera on Android Devices",
key = "perm:android:control-camera", key = "perm:android:control-camera",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/camera"} permissions = {"/device-mgt/devices/owning-device/operations/android/camera"}
), ),
@Scope( @Scope(
name = "Get Info", name = "Get Info",
description = "Requesting device information from Android Devices", description = "Requesting device information from Android Devices",
key = "perm:android:info", key = "perm:android:info",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/info"} permissions = {"/device-mgt/devices/owning-device/operations/android/info"}
), ),
@Scope( @Scope(
name = "Get Logs", name = "Get Logs",
description = "Requesting Logcat Details from Android Devices", description = "Requesting Logcat Details from Android Devices",
key = "perm:android:logcat", key = "perm:android:logcat",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/logcat"} permissions = {"/device-mgt/devices/owning-device/operations/android/logcat"}
), ),
@Scope( @Scope(
name = "Enterprise Wipe", name = "Enterprise Wipe",
description = "Enterprise Wiping Android Devices", description = "Enterprise Wiping Android Devices",
key = "perm:android:enterprise-wipe", key = "perm:android:enterprise-wipe",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/enterprise-wipe"} permissions = {"/device-mgt/devices/owning-device/operations/android/enterprise-wipe"}
), ),
@Scope( @Scope(
name = "Factory Reset", name = "Factory Reset",
description = "Factory Resetting Android Devices", description = "Factory Resetting Android Devices",
key = "perm:android:wipe", key = "perm:android:wipe",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/wipe"} permissions = {"/device-mgt/devices/owning-device/operations/android/wipe"}
), ),
@Scope( @Scope(
name = "Get Installed Applications", name = "Get Installed Applications",
description = "Get list of installed applications", description = "Get list of installed applications",
key = "perm:android:applications", key = "perm:android:applications",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/applications"} permissions = {"/device-mgt/devices/owning-device/operations/android/applications"}
), ),
@Scope( @Scope(
name = "Ring Device", name = "Ring Device",
description = "Ring Android devices", description = "Ring Android devices",
key = "perm:android:ring", key = "perm:android:ring",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/ring"} permissions = {"/device-mgt/devices/owning-device/operations/android/ring"}
), ),
@Scope( @Scope(
name = "Reboot Device", name = "Reboot Device",
description = "Reboot Android devices", description = "Reboot Android devices",
key = "perm:android:reboot", key = "perm:android:reboot",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/reboot"} permissions = {"/device-mgt/devices/owning-device/operations/android/reboot"}
), ),
@Scope( @Scope(
name = "Mute Device", name = "Mute Device",
description = "Mute Android devices", description = "Mute Android devices",
key = "perm:android:mute", key = "perm:android:mute",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/mute"} permissions = {"/device-mgt/devices/owning-device/operations/android/mute"}
), ),
@Scope( @Scope(
name = "Install Applications", name = "Install Applications",
description = "Installing an Application on Android Devices", description = "Installing an Application on Android Devices",
key = "perm:android:install-application", key = "perm:android:install-application",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/install-app"} permissions = {"/device-mgt/devices/owning-device/operations/android/install-app"}
), ),
@Scope( @Scope(
name = "Update Applications", name = "Update Applications",
description = "Updating an Application on Android Devices", description = "Updating an Application on Android Devices",
key = "perm:android:update-application", key = "perm:android:update-application",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/update-app"} permissions = {"/device-mgt/devices/owning-device/operations/android/update-app"}
), ),
@Scope( @Scope(
name = "Uninstall Applications", name = "Uninstall Applications",
description = "Uninstalling an Application on Android Devices", description = "Uninstalling an Application on Android Devices",
key = "perm:android:uninstall-application", key = "perm:android:uninstall-application",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/uninstall-app"} permissions = {"/device-mgt/devices/owning-device/operations/android/uninstall-app"}
), ),
@Scope( @Scope(
name = "Blacklist Applications", name = "Blacklist Applications",
description = "Blacklisting applications on Android Devices", description = "Blacklisting applications on Android Devices",
key = "perm:android:blacklist-applications", key = "perm:android:blacklist-applications",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/blacklist-app"} permissions = {"/device-mgt/devices/owning-device/operations/android/blacklist-app"}
), ),
@Scope( @Scope(
name = "Upgrade Firmware", name = "Upgrade Firmware",
description = "Upgrading Firmware of Android Devices", description = "Upgrading Firmware of Android Devices",
key = "perm:android:upgrade-firmware", key = "perm:android:upgrade-firmware",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/upgrade"} permissions = {"/device-mgt/devices/owning-device/operations/android/upgrade"}
), ),
@Scope( @Scope(
name = "Configure VPN", name = "Configure VPN",
description = "Configure VPN on Android Device", description = "Configure VPN on Android Device",
key = "perm:android:configure-vpn", key = "perm:android:configure-vpn",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/vpn"} permissions = {"/device-mgt/devices/owning-device/operations/android/vpn"}
), ),
@Scope( @Scope(
name = "Send Notification", name = "Send Notification",
description = "Sending a notification to Android Device", description = "Sending a notification to Android Device",
key = "perm:android:send-notification", key = "perm:android:send-notification",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/send-notification"} permissions = {"/device-mgt/devices/owning-device/operations/android/send-notification"}
), ),
@Scope( @Scope(
name = "Configure Wi-Fi", name = "Configure Wi-Fi",
description = "Configure Wi-Fi on Android Device", description = "Configure Wi-Fi on Android Device",
key = "perm:android:configure-wifi", key = "perm:android:configure-wifi",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/wifi"} permissions = {"/device-mgt/devices/owning-device/operations/android/wifi"}
), ),
@Scope( @Scope(
name = "Encrypt Storage", name = "Encrypt Storage",
description = "Encrypting storage on Android Device", description = "Encrypting storage on Android Device",
key = "perm:android:encrypt-storage", key = "perm:android:encrypt-storage",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/encrypt"} permissions = {"/device-mgt/devices/owning-device/operations/android/encrypt"}
), ),
@Scope( @Scope(
name = "Change Password", name = "Change Password",
description = "Changing the lock code of an Android Device", description = "Changing the lock code of an Android Device",
key = "perm:android:change-lock-code", key = "perm:android:change-lock-code",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/change-lock-code"} permissions = {"/device-mgt/devices/owning-device/operations/android/change-lock-code"}
), ),
@Scope( @Scope(
name = "Password Policy", name = "Password Policy",
description = "Set password policy of an Android Device", description = "Set password policy of an Android Device",
key = "perm:android:set-password-policy", key = "perm:android:set-password-policy",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/password-policy"} permissions = {"/device-mgt/devices/owning-device/operations/android/password-policy"}
), ),
@Scope( @Scope(
name = "Add Web clip", name = "Add Web clip",
description = "Setting a Web Clip on Android Devices", description = "Setting a Web Clip on Android Devices",
key = "perm:android:set-webclip", key = "perm:android:set-webclip",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/webclip"} permissions = {"/device-mgt/devices/owning-device/operations/android/webclip"}
), ),
@Scope( @Scope(
name = "File Transfer", name = "File Transfer",
description = "Transferring a file to android devices", description = "Transferring a file to android devices",
key = "perm:android:file-transfer", key = "perm:android:file-transfer",
roles = {"admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/file-transfer"} permissions = {"/device-mgt/devices/owning-device/operations/android/file-transfer"}
) )
} }

@ -71,12 +71,14 @@ import java.util.List;
name = "Enroll Device", name = "Enroll Device",
description = "Register an Android device", description = "Register an Android device",
key = "perm:android:enroll", key = "perm:android:enroll",
roles = {"Internal/everyone"},
permissions = {"/device-mgt/devices/enroll/android"} permissions = {"/device-mgt/devices/enroll/android"}
), ),
@Scope( @Scope(
name = "Un-enroll Device", name = "Un-enroll Device",
description = "Unregister an Android device", description = "Unregister an Android device",
key = "perm:android:disenroll", key = "perm:android:disenroll",
roles = {"Internal/everyone"},
permissions = {"/device-mgt/devices/disenroll/android"} permissions = {"/device-mgt/devices/disenroll/android"}
) )
} }

@ -68,18 +68,21 @@ import javax.ws.rs.core.Response;
name = "Enroll Device", name = "Enroll Device",
description = "Register an Android device", description = "Register an Android device",
key = "perm:android:enroll", key = "perm:android:enroll",
roles = {"Internal/everyone"},
permissions = {"/device-mgt/devices/enroll/android"} permissions = {"/device-mgt/devices/enroll/android"}
), ),
@Scope( @Scope(
name = "View Configurations", name = "View Configurations",
description = "Getting Android Platform Configurations", description = "Getting Android Platform Configurations",
key = "perm:android:view-configuration", key = "perm:android:view-configuration",
roles = {"Internal/everyone"},
permissions = {"/device-mgt/devices/enroll/android"} permissions = {"/device-mgt/devices/enroll/android"}
), ),
@Scope( @Scope(
name = "Manage Configurations", name = "Manage Configurations",
description = "Updating Android Platform Configurations", description = "Updating Android Platform Configurations",
key = "perm:android:manage-configuration", key = "perm:android:manage-configuration",
roles = {"Internal/everyone"},
permissions = {"/device-mgt/platform-configurations/manage"} permissions = {"/device-mgt/platform-configurations/manage"}
) )
} }

@ -68,6 +68,7 @@ import javax.ws.rs.core.Response;
name = "Enroll Device", name = "Enroll Device",
description = "Register an Android device", description = "Register an Android device",
key = "perm:android:enroll", key = "perm:android:enroll",
roles = {"Internal/everyone"},
permissions = {"/device-mgt/devices/enroll/android"} permissions = {"/device-mgt/devices/enroll/android"}
) )
} }

@ -85,11 +85,6 @@
<artifactId>feign-gson</artifactId> <artifactId>feign-gson</artifactId>
<version>${io.github.openfeign.version}</version> <version>${io.github.openfeign.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.wso2.carbon.identity.carbon.auth.jwt</groupId>
<artifactId>org.wso2.carbon.identity.authenticator.signedjwt</artifactId>
<version>${identity.carbon.auth.jwt.version}</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
@ -218,9 +213,6 @@
<bundleDef> <bundleDef>
io.github.openfeign:feign-gson:${io.github.openfeign.version} io.github.openfeign:feign-gson:${io.github.openfeign.version}
</bundleDef> </bundleDef>
<bundleDef>
org.wso2.carbon.identity.carbon.auth.jwt:org.wso2.carbon.identity.authenticator.signedjwt:${identity.carbon.auth.jwt.version}
</bundleDef>
</bundles> </bundles>
</configuration> </configuration>
</execution> </execution>

@ -1259,8 +1259,8 @@
<apache.http.client.version>4.5.6</apache.http.client.version> <apache.http.client.version>4.5.6</apache.http.client.version>
<!-- Nimbus Jose--> <!-- Nimbus Jose-->
<nimbus.orbit.version>2.26.1.wso2v3</nimbus.orbit.version> <nimbus.orbit.version>7.3.0.wso2v1</nimbus.orbit.version>
<nimbus.orbit.version.range>[2.26.1, 3.0.0)</nimbus.orbit.version.range> <nimbus.orbit.version.range>[7.3, 8)</nimbus.orbit.version.range>
<commons.pool.wso2.version>1.5.6.wso2v1</commons.pool.wso2.version> <commons.pool.wso2.version>1.5.6.wso2v1</commons.pool.wso2.version>

Loading…
Cancel
Save