1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/server/qgsaccesscontrolfilter.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsAccessControlFilter
{
%Docstring(signature="appended")
Class defining access control interface for QGIS Server plugins.
Security can define any (or none) of the following method:
- :py:func:`~layerFilterExpression` - To set an additional QGIS
expression filter (WMS/GetMap, WMS/GetFeatureInfo, WFS/GetFeature)
- :py:func:`~layerFilterSubsetString` - To set an additional SQL subset
string filter (WMS/GetMap, WMS/GetFeatureInfo, WFS/GetFeature) for
layer that support SQL
- :py:func:`~layerPermissions` - To set the general layer permissins
(read / update / insert / delete)
- :py:func:`~authorizedLayerAttributes` - To filter the attributes
(WMS/GetFeatureInfo, WFS/GetFeature)
- :py:func:`~allowToEdit` - (all WFS-T requests)
- :py:func:`~cacheKey`
%End
%TypeHeaderCode
#include "qgsaccesscontrolfilter.h"
%End
public:
QgsAccessControlFilter( const QgsServerInterface *serverInterface );
%Docstring
Constructor :py:class:`QgsServerInterface` passed to plugins
constructors and must be passed to QgsAccessControlFilter instances.
%End
virtual ~QgsAccessControlFilter();
struct LayerPermissions
{
bool canRead;
bool canUpdate;
bool canInsert;
bool canDelete;
};
const QgsServerInterface *serverInterface() const;
%Docstring
Returns the :py:class:`QgsServerInterface` instance
%End
virtual QString layerFilterExpression( const QgsVectorLayer *layer ) const;
%Docstring
Returns an additional expression filter
:param layer: the layer to control
:return: the filter expression
%End
virtual QString layerFilterSubsetString( const QgsVectorLayer *layer ) const;
%Docstring
Returns an additional subset string (typically SQL) filter
:param layer: the layer to control
:return: the subset string
%End
virtual LayerPermissions layerPermissions( const QgsMapLayer *layer ) const;
%Docstring
Returns the layer permissions
:param layer: the layer to control
:return: the permission to use on the layer
%End
virtual QStringList authorizedLayerAttributes( const QgsVectorLayer *layer, const QStringList &attributes ) const;
%Docstring
Returns the authorized layer attributes
:param layer: the layer to control
:param attributes: the current list of visible attribute
:return: the new list of visible attributes
%End
virtual bool allowToEdit( const QgsVectorLayer *layer, const QgsFeature &feature ) const;
%Docstring
Are we authorized to modify the following geometry
:param layer: the layer to control
:param feature: the concerned feature
:return: ``True`` if we are allowed to edit
%End
virtual QString cacheKey() const;
%Docstring
Cache key to used to create the capabilities cache
:return: the cache key, "" for no cache
%End
};
typedef QMultiMap<int, QgsAccessControlFilter *> QgsAccessControlFilterMap;
/************************************************************************
* This file has been generated automatically from *
* *
* src/server/qgsaccesscontrolfilter.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|