Code format hawkbit2 (#1949)

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2024-11-05 11:43:54 +02:00
committed by GitHub
parent d842bc2aaa
commit 1c16bd66d3
9 changed files with 35 additions and 23 deletions

View File

@@ -82,7 +82,6 @@ public final class MgmtRestConstants {
* The basic authentication validation mapping
*/
public static final String AUTH_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/userinfo";
public static final String SYSTEM_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + BASE_SYSTEM_MAPPING;
/**
* String representation of
* {@link #REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT_VALUE}.
@@ -100,6 +99,7 @@ public final class MgmtRestConstants {
* The base URL mapping for the spring acuator management context path.
*/
public static final String BASE_SYSTEM_MAPPING = "/system";
public static final String SYSTEM_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + BASE_SYSTEM_MAPPING;
/**
* URL mapping for system admin operations.
*/

View File

@@ -11,7 +11,8 @@
-->
<project
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.hawkbit</groupId>

View File

@@ -11,7 +11,8 @@
-->
<project
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.hawkbit</groupId>

View File

@@ -11,7 +11,8 @@
-->
<project
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.hawkbit</groupId>

View File

@@ -11,7 +11,8 @@
-->
<project
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.hawkbit</groupId>

View File

@@ -11,7 +11,8 @@
-->
<project
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<parent>

View File

@@ -198,12 +198,22 @@ public final class SpPermission {
public static final String BRACKET_CLOSE = ")";
public static final String HAS_AUTH_PREFIX = "hasAuthority" + BRACKET_OPEN + "'";
public static final String HAS_AUTH_SUFFIX = "'" + BRACKET_CLOSE;
public static final String HAS_AUTH_AND = " and ";
/**
* The role which contains the spring security context in case the
* system is executing code which is necessary to be privileged.
*/
public static final String SYSTEM_ROLE = "ROLE_SYSTEM_CODE";
/**
* Spring security eval hasAnyRole expression to check if the spring
* context contains system code role
* {@link SpringEvalExpressions#SYSTEM_ROLE}.
*/
public static final String IS_SYSTEM_CODE = HAS_AUTH_PREFIX + SYSTEM_ROLE + HAS_AUTH_SUFFIX;
/**
* The spring security eval expression operator {@code or}.
*/
public static final String HAS_AUTH_OR = " or ";
/**
* Spring security eval hasAuthority expression to check if spring
* context contains {@link SpPermission#UPDATE_TARGET} or
@@ -377,16 +387,6 @@ public final class SpPermission {
*/
public static final String HAS_AUTH_TENANT_CONFIGURATION = HAS_AUTH_PREFIX + TENANT_CONFIGURATION
+ HAS_AUTH_SUFFIX + HAS_AUTH_OR + IS_SYSTEM_CODE;
public static final String HAS_AUTH_AND = " and ";
/**
* The role which contains the spring security context in case the
* system is executing code which is necessary to be privileged.
*/
public static final String SYSTEM_ROLE = "ROLE_SYSTEM_CODE";
/**
* The spring security eval expression operator {@code or}.
*/
public static final String HAS_AUTH_OR = " or ";
/**
* The role which contains in the spring security context in case an
* controller is authenticated.

View File

@@ -37,7 +37,8 @@
<div style="display: inline-block;">
<a href="https://github.com/laverman"><img
align="left"
src="https://avatars3.githubusercontent.com/u/9153035?s=120&v=4" style="border-radius: 50%;"></a>
src="https://avatars3.githubusercontent.com/u/9153035?s=120&v=4"
style="border-radius: 50%;"></a>
<p style="margin-left: 5em; margin-top: 0.5em;">Kai Zimmermann</p>
<i style="margin-left: 4em; margin-top: 0.5em; font-size: 0.5em;">Project Lead - Microsoft</i>
</div>
@@ -45,7 +46,8 @@
<div style="display: inline-block;">
<a href="https://github.com/schabdo"><img
align="left"
src="https://avatars1.githubusercontent.com/u/18215905?s=120&v=4" style="border-radius: 50%;"></a>
src="https://avatars1.githubusercontent.com/u/18215905?s=120&v=4"
style="border-radius: 50%;"></a>
<p style="margin-left: 5em; margin-top: 0.5em;">Dominic Schabel</p>
<i style="margin-left: 4em; margin-top: 0.5em; font-size: 0.5em;">Committer - Bosch</i>
</div>
@@ -73,7 +75,8 @@
<div style="display: inline-block;">
<a href="https://github.com/laverman"><img
align="left"
src="https://avatars3.githubusercontent.com/u/19288577?s=120&v=4" style="border-radius: 50%;"></a>
src="https://avatars3.githubusercontent.com/u/19288577?s=120&v=4"
style="border-radius: 50%;"></a>
<p style="margin-left: 5em; margin-top: 0.5em;">Jeroen Laverman</p>
<i style="margin-left: 4em; margin-top: 0.5em; font-size: 0.5em;">Project Lead - Bosch</i>
</div>
@@ -81,7 +84,8 @@
<div style="display: inline-block;">
<a href="https://github.com/stefbehl"><img
align="left"
src="https://avatars2.githubusercontent.com/u/16321153?s=120&v=4" style="border-radius: 50%;"></a>
src="https://avatars2.githubusercontent.com/u/16321153?s=120&v=4"
style="border-radius: 50%;"></a>
<p style="margin-left: 5em; margin-top: 0.5em;">Stefan Behl</p>
<i style="margin-left: 4em; margin-top: 0.5em; font-size: 0.5em;">Committer - Bosch</i>
</div>
@@ -89,7 +93,8 @@
<div style="display: inline-block;">
<a href="https://github.com/schabdo"><img
align="left"
src="https://avatars1.githubusercontent.com/u/18215905?s=120&v=4" style="border-radius: 50%;"></a>
src="https://avatars1.githubusercontent.com/u/18215905?s=120&v=4"
style="border-radius: 50%;"></a>
<p style="margin-left: 5em; margin-top: 0.5em;">Dominic Schabel</p>
<i style="margin-left: 4em; margin-top: 0.5em; font-size: 0.5em;">Committer - Bosch</i>
</div>

View File

@@ -46,7 +46,8 @@
<div style="display: inline-block;">
<a href="https://github.com/laverman"><img
align="left"
src="https://avatars3.githubusercontent.com/u/9153035?s=120&v=4" style="border-radius: 50%;"></a>
src="https://avatars3.githubusercontent.com/u/9153035?s=120&v=4"
style="border-radius: 50%;"></a>
<p style="margin-left: 5em; margin-top: 0.5em;">Kai Zimmermann</p>
<i style="margin-left: 4em; margin-top: 0.5em; font-size: 0.5em;">Project Lead - Microsoft</i>
</div>
@@ -54,7 +55,8 @@
<div style="display: inline-block;">
<a href="https://github.com/laverman"><img
align="left"
src="https://avatars3.githubusercontent.com/u/19288577?s=120&v=4" style="border-radius: 50%;"></a>
src="https://avatars3.githubusercontent.com/u/19288577?s=120&v=4"
style="border-radius: 50%;"></a>
<p style="margin-left: 5em; margin-top: 0.5em;">Jeroen Laverman</p>
<i style="margin-left: 4em; margin-top: 0.5em; font-size: 0.5em;">Project Lead - Bosch</i>
</div>