Class ACLMigrationTool
- java.lang.Object
-
- org.guvnor.common.services.backend.migration.ACLMigrationTool
-
@ApplicationScoped public class ACLMigrationTool extends Object
In previous versions (before the 7 release), the only way to grant access to resources likeOrganizationalUnit,RepositoryandModulewas to indicate which groups were able to access a given instance. Those groups were stored as part of the instance persistent status.As of 7 version, the authorization policy is based on permissions. That means is no longer required to keep a list of groups per resource instance. What is required is to define proper permission entries into the active
AuthorizationPolicyThis is a utility class which takes care of reading the groups declared for any of the above resource types and creating the necessary permissions so that those resources are protected from user access.
The migration procedure is carried out when an
AuthorizationPolicyDeployedEventis received, which means the application is starting up and deploying the authorization policy for the first time.
-
-
Constructor Summary
Constructors Constructor Description ACLMigrationTool(org.guvnor.structure.organizationalunit.OrganizationalUnitService organizationalUnitService, org.guvnor.structure.repositories.RepositoryService repositoryService, org.uberfire.security.authz.PermissionManager permissionManager, org.uberfire.backend.authz.AuthorizationPolicyStorage authorizationPolicyStorage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanisACLMigrationToolEnabled()voidmigrateOrgUnits(org.uberfire.security.authz.AuthorizationPolicy policy)voidmigrateRepositories(org.uberfire.security.authz.AuthorizationPolicy policy)voidonDeploy(org.uberfire.backend.events.AuthorizationPolicyDeployedEvent event)
-
-
-
Constructor Detail
-
ACLMigrationTool
@Inject public ACLMigrationTool(org.guvnor.structure.organizationalunit.OrganizationalUnitService organizationalUnitService, org.guvnor.structure.repositories.RepositoryService repositoryService, org.uberfire.security.authz.PermissionManager permissionManager, org.uberfire.backend.authz.AuthorizationPolicyStorage authorizationPolicyStorage)
-
-
Method Detail
-
onDeploy
public void onDeploy(@Observes org.uberfire.backend.events.AuthorizationPolicyDeployedEvent event)
-
isACLMigrationToolEnabled
protected boolean isACLMigrationToolEnabled()
-
migrateOrgUnits
public void migrateOrgUnits(org.uberfire.security.authz.AuthorizationPolicy policy)
-
migrateRepositories
public void migrateRepositories(org.uberfire.security.authz.AuthorizationPolicy policy)
-
-