private boolean hasServiceRegistrationPermissions()
{
boolean allowed = true;
if ( System.getSecurityManager() != null )
{
final ServiceMetadata serviceMetadata = getComponentMetadata().getServiceMetadata();
if ( serviceMetadata != null )
{
final String[] services = serviceMetadata.getProvides();
if ( services != null && services.length > 0 )
{
final Bundle bundle = getBundle();
for ( String service : services )
{