QGIS API Documentation  2.14.0-Essen
Classes | Public Member Functions | List of all members
QgsAccessControlFilter Class Reference

Class defining access control interface for QGIS Server plugins. More...

#include <qgsaccesscontrolfilter.h>

Classes

struct  LayerPermissions
 Describe the layer permission. More...
 

Public Member Functions

 QgsAccessControlFilter (const QgsServerInterface *serverInterface)
 Constructor QgsServerInterface passed to plugins constructors and must be passed to QgsAccessControlFilter instances. More...
 
virtual ~QgsAccessControlFilter ()
 Destructor. More...
 
virtual bool allowToEdit (const QgsVectorLayer *layer, const QgsFeature &feature) const
 Are we authorized to modify the following geometry. More...
 
virtual QStringList authorizedLayerAttributes (const QgsVectorLayer *layer, const QStringList &attributes) const
 Return the authorized layer attributes. More...
 
virtual QString cacheKey () const
 Cache key to used to create the capabilities cache. More...
 
virtual QString layerFilterExpression (const QgsVectorLayer *layer) const
 Return an additional expression filter. More...
 
virtual QString layerFilterSubsetString (const QgsVectorLayer *layer) const
 Return an additional subset string (typically SQL) filter. More...
 
virtual LayerPermissions layerPermissions (const QgsMapLayer *layer) const
 Return the layer permissions. More...
 
const QgsServerInterfaceserverInterface () const
 Return the QgsServerInterface instance. More...
 

Detailed Description

Class defining access control interface for QGIS Server plugins.

Security can define any (or none) of the following method:

Definition at line 44 of file qgsaccesscontrolfilter.h.

Constructor & Destructor Documentation

QgsAccessControlFilter::QgsAccessControlFilter ( const QgsServerInterface serverInterface)

Constructor QgsServerInterface passed to plugins constructors and must be passed to QgsAccessControlFilter instances.

virtual QgsAccessControlFilter::~QgsAccessControlFilter ( )
virtual

Destructor.

Member Function Documentation

virtual bool QgsAccessControlFilter::allowToEdit ( const QgsVectorLayer layer,
const QgsFeature feature 
) const
virtual

Are we authorized to modify the following geometry.

Parameters
layerthe layer to control
featurethe concerned feature
Returns
true if we are allowed to edit
virtual QStringList QgsAccessControlFilter::authorizedLayerAttributes ( const QgsVectorLayer layer,
const QStringList attributes 
) const
virtual

Return the authorized layer attributes.

Parameters
layerthe layer to control
attributesthe current list of visible attribute
Returns
the new list of visible attributes
virtual QString QgsAccessControlFilter::cacheKey ( ) const
virtual

Cache key to used to create the capabilities cache.

Returns
the cache key, "" for no cache
virtual QString QgsAccessControlFilter::layerFilterExpression ( const QgsVectorLayer layer) const
virtual

Return an additional expression filter.

Parameters
layerthe layer to control
Returns
the filter expression
virtual QString QgsAccessControlFilter::layerFilterSubsetString ( const QgsVectorLayer layer) const
virtual

Return an additional subset string (typically SQL) filter.

Parameters
layerthe layer to control
Returns
the subset string
virtual LayerPermissions QgsAccessControlFilter::layerPermissions ( const QgsMapLayer layer) const
virtual

Return the layer permissions.

Parameters
layerthe layer to control
Returns
the permission to use on the layer
const QgsServerInterface* QgsAccessControlFilter::serverInterface ( ) const
inline

Return the QgsServerInterface instance.

Definition at line 67 of file qgsaccesscontrolfilter.h.


The documentation for this class was generated from the following file: