Add fine grained sm/ds type permission (#2649)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -41,7 +41,7 @@ public interface DistributionSetTypeManagement<T extends DistributionSetType>
|
||||
|
||||
@Override
|
||||
default String permissionGroup() {
|
||||
return SpPermission.DISTRIBUTION_SET;
|
||||
return SpPermission.DISTRIBUTION_SET_TYPE;
|
||||
}
|
||||
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_READ_REPOSITORY)
|
||||
|
||||
@@ -35,7 +35,7 @@ public interface SoftwareModuleTypeManagement<T extends SoftwareModuleType>
|
||||
|
||||
@Override
|
||||
default String permissionGroup() {
|
||||
return SpPermission.SOFTWARE_MODULE;
|
||||
return SpPermission.SOFTWARE_MODULE_TYPE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -46,19 +46,17 @@ public interface SystemManagement {
|
||||
Page<String> findTenants(@NotNull Pageable pageable);
|
||||
|
||||
/**
|
||||
* Runs consumer for each teant as
|
||||
* Runs consumer for each tenant as
|
||||
* {@link TenantAware#runAsTenant(String, org.eclipse.hawkbit.tenancy.TenantAware.TenantRunner)}
|
||||
* sliently (i.e. exceptions will be logged but operations will continue for
|
||||
* further tenants).
|
||||
* silently (i.e. exceptions will be logged but operations will continue for further tenants).
|
||||
*
|
||||
* @param consumer to run as teanant
|
||||
* @param consumer to run as tenant
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.IS_SYSTEM_CODE)
|
||||
void forEachTenant(Consumer<String> consumer);
|
||||
|
||||
/**
|
||||
* Calculated system usage statistics, both overall for the entire system
|
||||
* and per tenant;
|
||||
* Calculated system usage statistics, both overall for the entire system and per tenant;
|
||||
*
|
||||
* @return SystemUsageReport of the current system
|
||||
*/
|
||||
|
||||
@@ -61,7 +61,7 @@ public interface Target extends NamedEntity, Identifiable<Long> {
|
||||
|
||||
/**
|
||||
* @return the securityToken if the current security context contains the necessary permission
|
||||
* {@link org.eclipse.hawkbit.im.authentication.SpPermission#READ_TARGET_SEC_TOKEN}
|
||||
* {@link org.eclipse.hawkbit.im.authentication.SpPermission#READ_TARGET_SECURITY_TOKEN}
|
||||
* or the current context is executed as system code, otherwise {@code null}.
|
||||
*/
|
||||
String getSecurityToken();
|
||||
|
||||
Reference in New Issue
Block a user