QGIS API Documentation 3.36.0-Maidenhead (09951dc0acf)
Loading...
Searching...
No Matches
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.
 
virtual ~QgsAccessControlFilter ()=default
 
virtual bool allowToEdit (const QgsVectorLayer *layer, const QgsFeature &feature) const
 Are we authorized to modify the following geometry.
 
virtual QStringList authorizedLayerAttributes (const QgsVectorLayer *layer, const QStringList &attributes) const
 Returns the authorized layer attributes.
 
virtual QString cacheKey () const
 Cache key to used to create the capabilities cache.
 
virtual QString layerFilterExpression (const QgsVectorLayer *layer) const
 Returns an additional expression filter.
 
virtual QString layerFilterSubsetString (const QgsVectorLayer *layer) const
 Returns an additional subset string (typically SQL) filter.
 
virtual LayerPermissions layerPermissions (const QgsMapLayer *layer) const
 Returns the layer permissions.
 
const QgsServerInterfaceserverInterface () const
 Returns the QgsServerInterface instance.
 

Detailed Description

Class defining access control interface for QGIS Server plugins.

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

Definition at line 50 of file qgsaccesscontrolfilter.h.

Constructor & Destructor Documentation

◆ QgsAccessControlFilter()

QgsAccessControlFilter::QgsAccessControlFilter ( const QgsServerInterface serverInterface)

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

Constructor.

Definition at line 27 of file qgsaccesscontrolfilter.cpp.

◆ ~QgsAccessControlFilter()

virtual QgsAccessControlFilter::~QgsAccessControlFilter ( )
virtualdefault

Member Function Documentation

◆ allowToEdit()

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

Are we authorized to modify the following geometry.

Are we authorized to modify the feature.

Parameters
layerthe layer to control
featurethe concerned feature
Returns
true if we are allowed to edit

Definition at line 67 of file qgsaccesscontrolfilter.cpp.

◆ authorizedLayerAttributes()

QStringList QgsAccessControlFilter::authorizedLayerAttributes ( const QgsVectorLayer layer,
const QStringList &  attributes 
) const
virtual

Returns the authorized layer attributes.

Parameters
layerthe layer to control
attributesthe current list of visible attribute
Returns
the new list of visible attributes

Definition at line 59 of file qgsaccesscontrolfilter.cpp.

◆ cacheKey()

QString QgsAccessControlFilter::cacheKey ( ) const
virtual

Cache key to used to create the capabilities cache.

Cache key to used to create the capabilities cache, "" for no cache.

Returns
the cache key, "" for no cache

Definition at line 76 of file qgsaccesscontrolfilter.cpp.

◆ layerFilterExpression()

QString QgsAccessControlFilter::layerFilterExpression ( const QgsVectorLayer layer) const
virtual

Returns an additional expression filter.

Returns an additional layer expression filter.

Parameters
layerthe layer to control
Returns
the filter expression

Definition at line 33 of file qgsaccesscontrolfilter.cpp.

◆ layerFilterSubsetString()

QString QgsAccessControlFilter::layerFilterSubsetString ( const QgsVectorLayer layer) const
virtual

Returns an additional subset string (typically SQL) filter.

Returns an additional layer subset string (typically SQL) filter.

Parameters
layerthe layer to control
Returns
the subset string

Definition at line 41 of file qgsaccesscontrolfilter.cpp.

◆ layerPermissions()

QgsAccessControlFilter::LayerPermissions QgsAccessControlFilter::layerPermissions ( const QgsMapLayer layer) const
virtual

Returns the layer permissions.

Parameters
layerthe layer to control
Returns
the permission to use on the layer

Definition at line 49 of file qgsaccesscontrolfilter.cpp.

◆ serverInterface()

const QgsServerInterface * QgsAccessControlFilter::serverInterface ( ) const
inline

Returns the QgsServerInterface instance.

Definition at line 74 of file qgsaccesscontrolfilter.h.


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