RoleBasedPermissionManager permManager = (RoleBasedPermissionManager) Component.getInstance( "roleBasedPermissionManager" );
List<RoleBasedPermission> permissions = permManager.getRoleBasedPermission();
if ( permissions.size() == 0 ) {
Identity.instance().logout();
throw new AuthorizationException( "This user has no permissions setup." );
}
if ( invalidSecuritySerilizationSetup() ) {
Identity.instance().logout();
throw new AuthorizationException( " Configuration error - Please refer to the Administration Guide section on installation. You must configure a key store before proceding. " );
}
return new CapabilityCalculator().calcCapabilities( permissions, PREFERENCES );
} else {
if ( invalidSecuritySerilizationSetup() ) {
throw new AuthorizationException( " Configuration error - Please refer to the Administration Guide section on installation. You must configure a key store before proceding. " );
}
return Capabilities.all( PREFERENCES );
}
}