{"action":"created","comment":{"url":"https://api.github.com/repos/qgis/QGIS/pulls/comments/30967395","id":30967395,"diff_hunk":"@@ -0,0 +1,124 @@\n+/***************************************************************************\n+                              qgsaccesscontrol.cpp\n+                              --------------------\n+  begin                : 22-05-2015\n+  copyright            : (C) 2008 by Stéphane Brunner\n+  email                : stephane dot brunner at camptocamp dot com\n+ ***************************************************************************/\n+\n+/***************************************************************************\n+ *                                                                         *\n+ *   This program is free software; you can redistribute it and/or modify  *\n+ *   it under the terms of the GNU General Public License as published by  *\n+ *   the Free Software Foundation; either version 2 of the License, or     *\n+ *   (at your option) any later version.                                   *\n+ *                                                                         *\n+ ***************************************************************************/\n+\n+#include \"qgsaccesscontrol.h\"\n+#include \"qgsmaplayer.h\"\n+#include \"qgsvectorlayer.h\"\n+\n+#include <QStringList>\n+\n+\n+QgsAccessControl::QgsAccessControl( const QMultiMap<int, QgsAccessControlPlugin*>* ps, const QgsRequest* request )\n+    : mPluginsSecurity( ps )\n+    , mRequest( request )\n+{\n+}\n+\n+/** Return an additional expresion filter */\n+const QString QgsAccessControl::getExtraExpression( const QgsVectorLayer* layer ) const","path":"src/server/qgsaccesscontrol.cpp","position":32,"original_position":32,"commit_id":"72e7ad77306a35f71ff094b79d66d12dcc745832","original_commit_id":"72e7ad77306a35f71ff094b79d66d12dcc745832","user":{"login":"jef-n","id":238070,"avatar_url":"https://avatars.githubusercontent.com/u/238070?v=3","gravatar_id":"","url":"https://api.github.com/users/jef-n","html_url":"https://github.com/jef-n","followers_url":"https://api.github.com/users/jef-n/followers","following_url":"https://api.github.com/users/jef-n/following{/other_user}","gists_url":"https://api.github.com/users/jef-n/gists{/gist_id}","starred_url":"https://api.github.com/users/jef-n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jef-n/subscriptions","organizations_url":"https://api.github.com/users/jef-n/orgs","repos_url":"https://api.github.com/users/jef-n/repos","events_url":"https://api.github.com/users/jef-n/events{/privacy}","received_events_url":"https://api.github.com/users/jef-n/received_events","type":"User","site_admin":false},"body":"typo","created_at":"2015-05-25T07:57:17Z","updated_at":"2015-05-25T07:57:17Z","html_url":"https://github.com/qgis/QGIS/pull/2056#discussion_r30967395","pull_request_url":"https://api.github.com/repos/qgis/QGIS/pulls/2056","_links":{"self":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/comments/30967395"},"html":{"href":"https://github.com/qgis/QGIS/pull/2056#discussion_r30967395"},"pull_request":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/2056"}}},"pull_request":{"url":"https://api.github.com/repos/qgis/QGIS/pulls/2056","id":35942178,"html_url":"https://github.com/qgis/QGIS/pull/2056","diff_url":"https://github.com/qgis/QGIS/pull/2056.diff","patch_url":"https://github.com/qgis/QGIS/pull/2056.patch","issue_url":"https://api.github.com/repos/qgis/QGIS/issues/2056","number":2056,"state":"open","locked":false,"title":"[Work in progress] [Feature] Add an interface in QGIS Server for access control plugins","user":{"login":"sbrunner","id":353872,"avatar_url":"https://avatars.githubusercontent.com/u/353872?v=3","gravatar_id":"","url":"https://api.github.com/users/sbrunner","html_url":"https://github.com/sbrunner","followers_url":"https://api.github.com/users/sbrunner/followers","following_url":"https://api.github.com/users/sbrunner/following{/other_user}","gists_url":"https://api.github.com/users/sbrunner/gists{/gist_id}","starred_url":"https://api.github.com/users/sbrunner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbrunner/subscriptions","organizations_url":"https://api.github.com/users/sbrunner/orgs","repos_url":"https://api.github.com/users/sbrunner/repos","events_url":"https://api.github.com/users/sbrunner/events{/privacy}","received_events_url":"https://api.github.com/users/sbrunner/received_events","type":"User","site_admin":false},"body":"The plugin define the following methods:\r\n\r\n* getLayerFilter\r\n  Return an additional filter, used in\r\n  WMS/GetMap, WMS/GetFeatureInfo, WFS/GetFeature to filter the features\r\n* getLayerRights\r\n  Change the rights on the layer per user (known by the plugin)\r\n  Concern rights: publish, insert, update, delete.\r\n  Mostly used in WFS/Transaction, and the publish in all requests.\r\n* getAuthorizedLayerAttributes\r\n  Be able to show some attributes only for a subset of user\r\n  Used in: WMS/GetFeatureInfo, WFS/GetFeature\r\n* allowToEdit\r\n  Be able to don't allow to edit a particular feature, in our case base\r\n  on the Geometry\r\n  Used in: WFS/Transaction\r\n\r\nTODO:\r\n * [x] Rename it to `AccessControl`\r\n * [x] Break the core dependency to server by create en interface\r\n * [ ] Include it only on `WITH_SERVER_PLUGINS`","created_at":"2015-05-21T14:54:52Z","updated_at":"2015-05-25T07:57:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab973b3ce7cebe392418b87f12ec69f7feb60ca4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/qgis/QGIS/pulls/2056/commits","review_comments_url":"https://api.github.com/repos/qgis/QGIS/pulls/2056/comments","review_comment_url":"https://api.github.com/repos/qgis/QGIS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/qgis/QGIS/issues/2056/comments","statuses_url":"https://api.github.com/repos/qgis/QGIS/statuses/72e7ad77306a35f71ff094b79d66d12dcc745832","head":{"label":"sbrunner:qgis-server-security","ref":"qgis-server-security","sha":"72e7ad77306a35f71ff094b79d66d12dcc745832","user":{"login":"sbrunner","id":353872,"avatar_url":"https://avatars.githubusercontent.com/u/353872?v=3","gravatar_id":"","url":"https://api.github.com/users/sbrunner","html_url":"https://github.com/sbrunner","followers_url":"https://api.github.com/users/sbrunner/followers","following_url":"https://api.github.com/users/sbrunner/following{/other_user}","gists_url":"https://api.github.com/users/sbrunner/gists{/gist_id}","starred_url":"https://api.github.com/users/sbrunner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbrunner/subscriptions","organizations_url":"https://api.github.com/users/sbrunner/orgs","repos_url":"https://api.github.com/users/sbrunner/repos","events_url":"https://api.github.com/users/sbrunner/events{/privacy}","received_events_url":"https://api.github.com/users/sbrunner/received_events","type":"User","site_admin":false},"repo":{"id":11445554,"name":"QGIS","full_name":"sbrunner/QGIS","owner":{"login":"sbrunner","id":353872,"avatar_url":"https://avatars.githubusercontent.com/u/353872?v=3","gravatar_id":"","url":"https://api.github.com/users/sbrunner","html_url":"https://github.com/sbrunner","followers_url":"https://api.github.com/users/sbrunner/followers","following_url":"https://api.github.com/users/sbrunner/following{/other_user}","gists_url":"https://api.github.com/users/sbrunner/gists{/gist_id}","starred_url":"https://api.github.com/users/sbrunner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbrunner/subscriptions","organizations_url":"https://api.github.com/users/sbrunner/orgs","repos_url":"https://api.github.com/users/sbrunner/repos","events_url":"https://api.github.com/users/sbrunner/events{/privacy}","received_events_url":"https://api.github.com/users/sbrunner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sbrunner/QGIS","description":"QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)","fork":true,"url":"https://api.github.com/repos/sbrunner/QGIS","forks_url":"https://api.github.com/repos/sbrunner/QGIS/forks","keys_url":"https://api.github.com/repos/sbrunner/QGIS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sbrunner/QGIS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sbrunner/QGIS/teams","hooks_url":"https://api.github.com/repos/sbrunner/QGIS/hooks","issue_events_url":"https://api.github.com/repos/sbrunner/QGIS/issues/events{/number}","events_url":"https://api.github.com/repos/sbrunner/QGIS/events","assignees_url":"https://api.github.com/repos/sbrunner/QGIS/assignees{/user}","branches_url":"https://api.github.com/repos/sbrunner/QGIS/branches{/branch}","tags_url":"https://api.github.com/repos/sbrunner/QGIS/tags","blobs_url":"https://api.github.com/repos/sbrunner/QGIS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sbrunner/QGIS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sbrunner/QGIS/git/refs{/sha}","trees_url":"https://api.github.com/repos/sbrunner/QGIS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sbrunner/QGIS/statuses/{sha}","languages_url":"https://api.github.com/repos/sbrunner/QGIS/languages","stargazers_url":"https://api.github.com/repos/sbrunner/QGIS/stargazers","contributors_url":"https://api.github.com/repos/sbrunner/QGIS/contributors","subscribers_url":"https://api.github.com/repos/sbrunner/QGIS/subscribers","subscription_url":"https://api.github.com/repos/sbrunner/QGIS/subscription","commits_url":"https://api.github.com/repos/sbrunner/QGIS/commits{/sha}","git_commits_url":"https://api.github.com/repos/sbrunner/QGIS/git/commits{/sha}","comments_url":"https://api.github.com/repos/sbrunner/QGIS/comments{/number}","issue_comment_url":"https://api.github.com/repos/sbrunner/QGIS/issues/comments{/number}","contents_url":"https://api.github.com/repos/sbrunner/QGIS/contents/{+path}","compare_url":"https://api.github.com/repos/sbrunner/QGIS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sbrunner/QGIS/merges","archive_url":"https://api.github.com/repos/sbrunner/QGIS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sbrunner/QGIS/downloads","issues_url":"https://api.github.com/repos/sbrunner/QGIS/issues{/number}","pulls_url":"https://api.github.com/repos/sbrunner/QGIS/pulls{/number}","milestones_url":"https://api.github.com/repos/sbrunner/QGIS/milestones{/number}","notifications_url":"https://api.github.com/repos/sbrunner/QGIS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sbrunner/QGIS/labels{/name}","releases_url":"https://api.github.com/repos/sbrunner/QGIS/releases{/id}","created_at":"2013-07-16T09:22:17Z","updated_at":"2015-05-15T10:27:26Z","pushed_at":"2015-05-24T11:09:33Z","git_url":"git://github.com/sbrunner/QGIS.git","ssh_url":"git@github.com:sbrunner/QGIS.git","clone_url":"https://github.com/sbrunner/QGIS.git","svn_url":"https://github.com/sbrunner/QGIS","homepage":"http://qgis.org","size":1040548,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"qgis:master","ref":"master","sha":"2ff6f7245a2516fb573357b379d6e138e035d96f","user":{"login":"qgis","id":483444,"avatar_url":"https://avatars.githubusercontent.com/u/483444?v=3","gravatar_id":"","url":"https://api.github.com/users/qgis","html_url":"https://github.com/qgis","followers_url":"https://api.github.com/users/qgis/followers","following_url":"https://api.github.com/users/qgis/following{/other_user}","gists_url":"https://api.github.com/users/qgis/gists{/gist_id}","starred_url":"https://api.github.com/users/qgis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qgis/subscriptions","organizations_url":"https://api.github.com/users/qgis/orgs","repos_url":"https://api.github.com/users/qgis/repos","events_url":"https://api.github.com/users/qgis/events{/privacy}","received_events_url":"https://api.github.com/users/qgis/received_events","type":"Organization","site_admin":false},"repo":{"id":1690480,"name":"QGIS","full_name":"qgis/QGIS","owner":{"login":"qgis","id":483444,"avatar_url":"https://avatars.githubusercontent.com/u/483444?v=3","gravatar_id":"","url":"https://api.github.com/users/qgis","html_url":"https://github.com/qgis","followers_url":"https://api.github.com/users/qgis/followers","following_url":"https://api.github.com/users/qgis/following{/other_user}","gists_url":"https://api.github.com/users/qgis/gists{/gist_id}","starred_url":"https://api.github.com/users/qgis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qgis/subscriptions","organizations_url":"https://api.github.com/users/qgis/orgs","repos_url":"https://api.github.com/users/qgis/repos","events_url":"https://api.github.com/users/qgis/events{/privacy}","received_events_url":"https://api.github.com/users/qgis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/qgis/QGIS","description":"QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)","fork":false,"url":"https://api.github.com/repos/qgis/QGIS","forks_url":"https://api.github.com/repos/qgis/QGIS/forks","keys_url":"https://api.github.com/repos/qgis/QGIS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/qgis/QGIS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/qgis/QGIS/teams","hooks_url":"https://api.github.com/repos/qgis/QGIS/hooks","issue_events_url":"https://api.github.com/repos/qgis/QGIS/issues/events{/number}","events_url":"https://api.github.com/repos/qgis/QGIS/events","assignees_url":"https://api.github.com/repos/qgis/QGIS/assignees{/user}","branches_url":"https://api.github.com/repos/qgis/QGIS/branches{/branch}","tags_url":"https://api.github.com/repos/qgis/QGIS/tags","blobs_url":"https://api.github.com/repos/qgis/QGIS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/qgis/QGIS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/qgis/QGIS/git/refs{/sha}","trees_url":"https://api.github.com/repos/qgis/QGIS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/qgis/QGIS/statuses/{sha}","languages_url":"https://api.github.com/repos/qgis/QGIS/languages","stargazers_url":"https://api.github.com/repos/qgis/QGIS/stargazers","contributors_url":"https://api.github.com/repos/qgis/QGIS/contributors","subscribers_url":"https://api.github.com/repos/qgis/QGIS/subscribers","subscription_url":"https://api.github.com/repos/qgis/QGIS/subscription","commits_url":"https://api.github.com/repos/qgis/QGIS/commits{/sha}","git_commits_url":"https://api.github.com/repos/qgis/QGIS/git/commits{/sha}","comments_url":"https://api.github.com/repos/qgis/QGIS/comments{/number}","issue_comment_url":"https://api.github.com/repos/qgis/QGIS/issues/comments{/number}","contents_url":"https://api.github.com/repos/qgis/QGIS/contents/{+path}","compare_url":"https://api.github.com/repos/qgis/QGIS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/qgis/QGIS/merges","archive_url":"https://api.github.com/repos/qgis/QGIS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/qgis/QGIS/downloads","issues_url":"https://api.github.com/repos/qgis/QGIS/issues{/number}","pulls_url":"https://api.github.com/repos/qgis/QGIS/pulls{/number}","milestones_url":"https://api.github.com/repos/qgis/QGIS/milestones{/number}","notifications_url":"https://api.github.com/repos/qgis/QGIS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/qgis/QGIS/labels{/name}","releases_url":"https://api.github.com/repos/qgis/QGIS/releases{/id}","created_at":"2011-05-02T08:06:26Z","updated_at":"2015-05-23T14:39:37Z","pushed_at":"2015-05-25T06:54:36Z","git_url":"git://github.com/qgis/QGIS.git","ssh_url":"git@github.com:qgis/QGIS.git","clone_url":"https://github.com/qgis/QGIS.git","svn_url":"https://github.com/qgis/QGIS","homepage":"http://qgis.org","size":1183214,"stargazers_count":675,"watchers_count":675,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":613,"mirror_url":null,"open_issues_count":63,"forks":613,"open_issues":63,"watchers":675,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/2056"},"html":{"href":"https://github.com/qgis/QGIS/pull/2056"},"issue":{"href":"https://api.github.com/repos/qgis/QGIS/issues/2056"},"comments":{"href":"https://api.github.com/repos/qgis/QGIS/issues/2056/comments"},"review_comments":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/2056/comments"},"review_comment":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/2056/commits"},"statuses":{"href":"https://api.github.com/repos/qgis/QGIS/statuses/72e7ad77306a35f71ff094b79d66d12dcc745832"}}}}