File: qgsaccesscontrol.sip.in

package info (click to toggle)
qgis 3.40.10%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,183,672 kB
  • sloc: cpp: 1,595,771; python: 372,544; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,257; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 161
file content (160 lines) | stat: -rw-r--r-- 4,360 bytes parent folder | download | duplicates (12)
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/server/qgsaccesscontrol.h                                        *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/







class QgsAccessControl : QgsFeatureFilterProvider
{
%Docstring(signature="appended")
A helper class that centralizes restrictions given by all the access
control filter plugins.
%End

%TypeHeaderCode
#include "qgsaccesscontrol.h"
#include "qgsaccesscontrolfilter.h"
%End
  public:
    QgsAccessControl();
%Docstring
Constructor
%End

    QgsAccessControl( const QgsAccessControl &copy );


    ~QgsAccessControl();


    void resolveFilterFeatures( const QList<QgsMapLayer *> &layers );
%Docstring
Resolve features' filter of layers The method fetch filter's expressions
returned from access control plugins and and combine them to a unique
expression for each layer. The resulted expressions are stored in cache
for efficiency; between each requests, the cache must be cleared using
':py:func:`~QgsAccessControl.unresolveFilterFeatures`'.

:param layers: to filter
%End

    void unresolveFilterFeatures();
%Docstring
Clear expression's cache computed from `resolveFilterFeatures`
%End

    virtual void filterFeatures( const QgsVectorLayer *layer, QgsFeatureRequest &filterFeatures ) const;

%Docstring
Filter the features of the layer

:param layer: the layer to control
:param filterFeatures: the request to fill
%End

    virtual QgsFeatureFilterProvider *clone() const /Factory/;

%Docstring
Returns a clone of the object

:return: A clone
%End

    QString extraSubsetString( const QgsVectorLayer *layer ) const;
%Docstring
Returns an additional subset string (typically SQL) filter

:param layer: the layer to control

:return: the subset string to use
%End

    bool layerReadPermission( const QgsMapLayer *layer ) const;
%Docstring
Returns the layer read right

:param layer: the layer to control

:return: ``True`` if it can be read
%End

    bool layerInsertPermission( const QgsVectorLayer *layer ) const;
%Docstring
Returns the layer insert right

:param layer: the layer to control

:return: ``True`` if we can insert on it
%End

    bool layerUpdatePermission( const QgsVectorLayer *layer ) const;
%Docstring
Returns the layer update right

:param layer: the layer to control

:return: ``True`` if we can do an update
%End

    bool layerDeletePermission( const QgsVectorLayer *layer ) const;
%Docstring
Returns the layer delete right

:param layer: the layer to control

:return: ``True`` if we can do a delete
%End

    virtual QStringList layerAttributes( const QgsVectorLayer *layer, const QStringList &attributes ) const;

%Docstring
Returns the authorized layer attributes

:param layer: the layer to control
:param attributes: the list of attribute

:return: the list of visible attributes
%End

    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 the feature
%End

    bool fillCacheKey( QStringList &cacheKey ) const;
%Docstring
Fill the capabilities caching key

:param cacheKey: the list to fill with a cache variant
%End

    void registerAccessControl( QgsAccessControlFilter *accessControl, int priority = 0 );
%Docstring
Register an access control filter

:param accessControl: the access control to add
:param priority: the priority used to define the order
%End

};

/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/server/qgsaccesscontrol.h                                        *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/