Represents the set of privileges possessed by a portal user. More...
|  Header |  #include <Portal | 
|  Since |  Esri | 
|  Inherits |  QAbstract | 
This class was introduced in Esri::ArcGISRuntime 100.0.
Public Types
| enum | Portal | 
Public Functions
| virtual | ~ | 
| bool | contains(const Esri | 
|  Esri | first() const | 
| int | index | 
| bool | is | 
|  Esri | last() const | 
Reimplemented Public Functions
|  virtual Esri | at(int index) const override | 
| virtual QVariant | data(const QModel | 
| virtual int | size() const override | 
Signals
| void | error | 
| void | portal | 
| void | portal | 
Detailed Description
This type is returned by calling privileges on a PortalUser object. Each privilege permits the user to peform specific operations on the portal.
The model returns data for the following roles:
| Role | Type | Description | PortalPrivilegeRoles | 
|---|---|---|---|
| portal | Portal | The realm the privilege belongs to. | Portal | 
| portal | Portal | The role the privilege applies to. | Portal | 
| portal | Portal | The operation permitted by the privilege. | Portal | 
| type | QString | The type name of the privilege. | Type | 
| portal | Portal | The fine-grained operation permitted by the privilege. | Portal | 
| subtype | QString | The subtype name of the privilege. | Subtype | 
Example:
Accessing various roles of the model from within a QML delegate:
Text{ anchors.fill: parent // acccess the portalPrivilegeRealm, portalPrivilegeRole, portalPrivilegeType // and portalPrivilegeSubtype roles of the model text: "realm:" + portalPrivilegeRealm + "; role:" + portalPrivilegeRole + "; type:" + portalPrivilegeType + "; subtype:" + portalPrivilegeSubtype wrapMode: Text.WrapAnywhere }
See also Portal and PortalPrivilege.
Member Type Documentation
enum PortalPrivilegeListModel::PortalPrivilegeRoles      
This enum specifies the custom roles which can be used with PortalPrivilegeListModel::data.
| Constant | Value | Description | 
|---|---|---|
Esri | Qt | The realm the privilege belongs to. | 
Esri | Qt | The role the privilege applies to. | 
Esri | Qt | The operation permitted by the privilege. | 
Esri | Qt | The type name of the privilege. | 
Esri | Qt | The fine-grained operation permitted by the privilege | 
Esri | Qt | The subtype name of the privilege. | 
Member Function Documentation
[signal] void PortalPrivilegeListModel::errorOccurred (Esri::ArcGISRuntime::Error    error)    
Signal emitted when an error occurs.
- error - Details about the error.
 
[signal] void PortalPrivilegeListModel::portalPrivilegeAdded  (int index)    
Signal emitted when a PortalPrivilege is added to the list model.
index is the index of the added privilege.
[signal] void PortalPrivilegeListModel::portalPrivilegeRemoved  (int index)    
Signal emitted when a PortalPrivilege is removed from the list model.
index is the index of the removed privilege.
[override virtual] PortalPrivilegeListModel::~PortalPrivilegeListModel    ()    
Destructor.
[override virtual] Esri::ArcGISRuntime::PortalPrivilege     PortalPrivilegeListModel::at(int index) const    
Returns the PortalPrivilege at the specified index.
bool PortalPrivilegeListModel::contains(const Esri::ArcGISRuntime::PortalPrivilege     &portalPrivilege ) const    
Returns whether the list model contains the specified portalPrivilege.
[override virtual] QVariant PortalPrivilegeListModel::data(const QModelIndex  &index, int role = Qt::DisplayRole) const      
Reimplements: QAbstractItemModel::data(const QModelIndex &index, int role) const.
Returns the data stored under the given role for the privilege referred to by the index.
- index. The index in the model for which to return data.
 - role. The role for which to return data.
 
Esri::ArcGISRuntime::PortalPrivilege     PortalPrivilegeListModel::first() const    
Returns the first PortalPrivilege in the list model.
int PortalPrivilegeListModel::indexOf (const Esri::ArcGISRuntime::PortalPrivilege     &portalPrivilege ) const    
Returns the index of the PortalPrivilege portalPrivilege.
bool PortalPrivilegeListModel::isEmpty () const    
Returns whether the list model is empty (contains no privileges).
Esri::ArcGISRuntime::PortalPrivilege     PortalPrivilegeListModel::last() const    
Returns the last PortalPrivilege in the list model.
[override virtual] int PortalPrivilegeListModel::size() const    
Returns the number of privileges contained in the list model.