VirtualBox

Ignore:
Timestamp:
Jul 1, 2020 6:06:19 PM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Chooser pane: Handle Cloud Profile Manager restrictions; Restricted provider/profiles will now be hidden on startup; Restriction changes doesn't being handled at runtime yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp

    r85036 r85037  
    849849    LogRelFlow(("UIChooserAbstractModel: Loading cloud providers/profiles...\n"));
    850850
     851    /* Acquire Cloud Profile Manager restrictions: */
     852    const QStringList restrictions = gEDataManager->cloudProfileManagerRestrictions();
     853
    851854    /* Iterate through existing providers: */
    852855    foreach (CCloudProvider comCloudProvider, listCloudProviders())
     
    859862        QString strProviderShortName;
    860863        if (!cloudProviderShortName(comCloudProvider, strProviderShortName))
     864            continue;
     865
     866        /* Make sure this provider isn't restricted: */
     867        const QString strProviderPath = QString("/%1").arg(strProviderShortName);
     868        if (restrictions.contains(strProviderPath))
    861869            continue;
    862870
     
    888896            QString strProfileName;
    889897            if (!cloudProfileName(comCloudProfile, strProfileName))
     898                continue;
     899
     900            /* Make sure this profile isn't restricted: */
     901            const QString strProfilePath = QString("/%1/%2").arg(strProviderShortName, strProfileName);
     902            if (restrictions.contains(strProfilePath))
    890903                continue;
    891904
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette