1- /***************************************************************************
2- qgsaccesscontrolfilter.sip
3- --------------------------
4- Access control interface for Qgis Server plugins
5-
6- begin : 2015-05-19
7- copyright : (C) 2015 by Stéphane Brunner
8- email : stephane dot brunner at camptocamp dot org
9- ***************************************************************************/
10-
11- /***************************************************************************
12- * *
13- * This program is free software; you can redistribute it and/or modify *
14- * it under the terms of the GNU General Public License as published by *
15- * the Free Software Foundation; either version 2 of the License, or *
16- * (at your option) any later version. *
17- * *
18- ***************************************************************************/
19-
20- /**
21- * \ingroup server
22- * \class QgsAccessControlFilter
23- * \brief Class defining access control interface for QGIS Server plugins.
24- *
25- * Security can define any (or none) of the following method:
26- * * layerFilterExpression() - To get an additional expression filter (WMS/GetMap, WMS/GetFeatureInfo, WFS/GetFeature)
27- * * layerFilterSQL() - To get an additional SQL filter (WMS/GetMap, WMS/GetFeatureInfo, WFS/GetFeature) for layer that support SQL
28- * * layerPermissions() - To give the general layer permissins (read / update / insert / delete)
29- * * authorizedLayerAttributes() - Tho filter the attributes (WMS/GetFeatureInfo, WFS/GetFeature)
30- * * allowToEdit() - (all WFS-T requests)
31- * * cacheKey()
32- */
1+ /************************************************************************
2+ * This file has been generated automatically from *
3+ * *
4+ * src/server/qgsaccesscontrolfilter.h *
5+ * *
6+ * Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+ ************************************************************************/
8+
9+
10+
11+
12+
3313
3414class QgsAccessControlFilter
3515{
16+ %Docstring
17+ Class defining access control interface for QGIS Server plugins.
18+
19+ Security can define any (or none) of the following method:
20+ * layerFilterExpression() - To get an additional expression filter (WMS/GetMap, WMS/GetFeatureInfo, WFS/GetFeature)
21+ * layerFilterSQL() - To get an additional SQL filter (WMS/GetMap, WMS/GetFeatureInfo, WFS/GetFeature) for layer that support SQL
22+ * layerPermissions() - To give the general layer permissins (read / update / insert / delete)
23+ * authorizedLayerAttributes() - Tho filter the attributes (WMS/GetFeatureInfo, WFS/GetFeature)
24+ * allowToEdit() - (all WFS-T requests)
25+ * cacheKey()
26+ %End
27+
3628%TypeHeaderCode
3729#include "qgsaccesscontrolfilter.h"
3830%End
39-
4031 public:
41- /** Constructor
42- * QgsServerInterface passed to plugins constructors
43- * and must be passed to QgsAccessControlFilter instances.
44- */
32+
4533 QgsAccessControlFilter( const QgsServerInterface *serverInterface );
46- /** Destructor */
34+ %Docstring
35+ Constructor
36+ QgsServerInterface passed to plugins constructors
37+ and must be passed to QgsAccessControlFilter instances.
38+ %End
39+
4740 virtual ~QgsAccessControlFilter();
4841
49- /** Describe the layer permission */
5042 struct LayerPermissions
5143 {
5244 bool canRead;
@@ -55,45 +47,70 @@ class QgsAccessControlFilter
5547 bool canDelete;
5648 };
5749
58- /** Return the QgsServerInterface instance*/
5950 const QgsServerInterface *serverInterface() const;
51+ %Docstring
52+ Return the QgsServerInterface instance
53+ :rtype: QgsServerInterface
54+ %End
6055
61- /** Return an additional expression filter
62- * @param layer the layer to control
63- * @return the filter expression
64- */
6556 virtual QString layerFilterExpression( const QgsVectorLayer *layer ) const;
57+ %Docstring
58+ Return an additional expression filter
59+ \param layer the layer to control
60+ :return: the filter expression
61+ :rtype: str
62+ %End
6663
67- /** Return an additional subset string (typically SQL) filter
68- * @param layer the layer to control
69- * @return the subset string
70- */
7164 virtual QString layerFilterSubsetString( const QgsVectorLayer *layer ) const;
65+ %Docstring
66+ Return an additional subset string (typically SQL) filter
67+ \param layer the layer to control
68+ :return: the subset string
69+ :rtype: str
70+ %End
7271
73- /** Return the layer permissions
74- * @param layer the layer to control
75- * @return the permission to use on the layer
76- */
7772 virtual LayerPermissions layerPermissions( const QgsMapLayer *layer ) const;
73+ %Docstring
74+ Return the layer permissions
75+ \param layer the layer to control
76+ :return: the permission to use on the layer
77+ :rtype: LayerPermissions
78+ %End
7879
79- /** Return the authorized layer attributes
80- * @param layer the layer to control
81- * @param attributes the current list of visible attribute
82- * @return the new list of visible attributes
83- */
8480 virtual QStringList authorizedLayerAttributes( const QgsVectorLayer *layer, const QStringList &attributes ) const;
81+ %Docstring
82+ Return the authorized layer attributes
83+ \param layer the layer to control
84+ \param attributes the current list of visible attribute
85+ :return: the new list of visible attributes
86+ :rtype: list of str
87+ %End
8588
86- /** Are we authorized to modify the following geometry
87- * @param layer the layer to control
88- * @param feature the concerned feature
89- * @return true if we are allowed to edit
90- */
9189 virtual bool allowToEdit( const QgsVectorLayer *layer, const QgsFeature &feature ) const;
90+ %Docstring
91+ Are we authorized to modify the following geometry
92+ \param layer the layer to control
93+ \param feature the concerned feature
94+ :return: true if we are allowed to edit
95+ :rtype: bool
96+ %End
9297
93- /** Cache key to used to create the capabilities cache
94- * @return the cache key, "" for no cache
95- */
9698 virtual QString cacheKey() const;
99+ %Docstring
100+ Cache key to used to create the capabilities cache
101+ :return: the cache key, "" for no cache
102+ :rtype: str
103+ %End
104+
97105};
98106
99- typedef QMultiMap<int, QgsAccessControlFilter*> QgsAccessControlFilterMap;
107+ typedef QMultiMap<int, QgsAccessControlFilter *> QgsAccessControlFilterMap;
108+
109+
110+ /************************************************************************
111+ * This file has been generated automatically from *
112+ * *
113+ * src/server/qgsaccesscontrolfilter.h *
114+ * *
115+ * Do not edit manually ! Edit header and run scripts/sipify.pl again *
116+ ************************************************************************/
0 commit comments