{"action":"created","comment":{"url":"https://api.github.com/repos/peholmst/vaadin4spring/pulls/comments/25075935","id":25075935,"diff_hunk":"@@ -0,0 +1,47 @@\n+/*\n+ * Copyright 2015 The original authors\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *   http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.vaadin.spring.navigator;\n+\n+import com.vaadin.navigator.View;\n+import com.vaadin.ui.UI;\n+\n+/**\n+* Interface to be implemented by Spring beans that will be consulted before the Spring View provider\n+* provides a view. If any of the view providers deny access, the view provider will act like no such\n+* view ever existed, or show an {@link org.vaadin.spring.navigator.SpringViewProvider#setAccessDeniedViewClass(Class) access denied view}.\n+*/\n+public interface ViewProviderAccessDelegate {\n+\n+    /**\n+     * Checks if the current user has access to the specified view and UI.\n+     *\n+     * @param beanName the bean name of the view, never {@code null}.\n+     * @param ui       the UI, never {@code null}.\n+     * @return true if access is granted, false if access is denied.\n+     */\n+    boolean isAccessGranted(String beanName, UI ui);\n+\n+    /**\n+     * Checks if the current user has access to the specified view instance and UI. This method is invoked\n+     * after {@link #isAccessGranted(com.vaadin.navigator.View, com.vaadin.ui.UI)}, when the view instance\n+     * has already been created, but before it has been returned by the view provider.\n+     *\n+     * @param view the view instance, never {@code null}.\n+     * @param ui   the UI, never {@code null}.\n+     * @return true if access is granted, false if access is denied.\n+     */\n+    boolean isAccessGranted(String beanName, View view, UI ui);","path":"spring-vaadin/src/main/java/org/vaadin/spring/navigator/ViewProviderAccessDelegate.java","position":null,"original_position":46,"commit_id":"261f0914d0609871662e8f9d1b59542229606bc8","original_commit_id":"7870535d0c1abdc4465cde9040ca9d3d8ce3eacb","user":{"login":"GJRTimmer","id":6072255,"avatar_url":"https://avatars.githubusercontent.com/u/6072255?v=3","gravatar_id":"","url":"https://api.github.com/users/GJRTimmer","html_url":"https://github.com/GJRTimmer","followers_url":"https://api.github.com/users/GJRTimmer/followers","following_url":"https://api.github.com/users/GJRTimmer/following{/other_user}","gists_url":"https://api.github.com/users/GJRTimmer/gists{/gist_id}","starred_url":"https://api.github.com/users/GJRTimmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GJRTimmer/subscriptions","organizations_url":"https://api.github.com/users/GJRTimmer/orgs","repos_url":"https://api.github.com/users/GJRTimmer/repos","events_url":"https://api.github.com/users/GJRTimmer/events{/privacy}","received_events_url":"https://api.github.com/users/GJRTimmer/received_events","type":"User","site_admin":false},"body":"Fixed","created_at":"2015-02-20T15:19:20Z","updated_at":"2015-02-20T15:19:20Z","html_url":"https://github.com/peholmst/vaadin4spring/pull/195#discussion_r25075935","pull_request_url":"https://api.github.com/repos/peholmst/vaadin4spring/pulls/195","_links":{"self":{"href":"https://api.github.com/repos/peholmst/vaadin4spring/pulls/comments/25075935"},"html":{"href":"https://github.com/peholmst/vaadin4spring/pull/195#discussion_r25075935"},"pull_request":{"href":"https://api.github.com/repos/peholmst/vaadin4spring/pulls/195"}}},"pull_request":{"url":"https://api.github.com/repos/peholmst/vaadin4spring/pulls/195","id":29697345,"html_url":"https://github.com/peholmst/vaadin4spring/pull/195","diff_url":"https://github.com/peholmst/vaadin4spring/pull/195.diff","patch_url":"https://github.com/peholmst/vaadin4spring/pull/195.patch","issue_url":"https://api.github.com/repos/peholmst/vaadin4spring/issues/195","number":195,"state":"open","locked":false,"title":"Security update of ViewAccessDelegates","user":{"login":"GJRTimmer","id":6072255,"avatar_url":"https://avatars.githubusercontent.com/u/6072255?v=3","gravatar_id":"","url":"https://api.github.com/users/GJRTimmer","html_url":"https://github.com/GJRTimmer","followers_url":"https://api.github.com/users/GJRTimmer/followers","following_url":"https://api.github.com/users/GJRTimmer/following{/other_user}","gists_url":"https://api.github.com/users/GJRTimmer/gists{/gist_id}","starred_url":"https://api.github.com/users/GJRTimmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GJRTimmer/subscriptions","organizations_url":"https://api.github.com/users/GJRTimmer/orgs","repos_url":"https://api.github.com/users/GJRTimmer/repos","events_url":"https://api.github.com/users/GJRTimmer/events{/privacy}","received_events_url":"https://api.github.com/users/GJRTimmer/received_events","type":"User","site_admin":false},"body":"Fixes #190 \r\n\r\nAlso moves the ViewProviderAccessDelegate to it's own class.\r\n\r\nFully tested and verified with debugger.","created_at":"2015-02-20T13:59:32Z","updated_at":"2015-02-20T15:19:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"29d161cd604f2d3c913f78013d22ed4f6adb4cf0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/peholmst/vaadin4spring/pulls/195/commits","review_comments_url":"https://api.github.com/repos/peholmst/vaadin4spring/pulls/195/comments","review_comment_url":"https://api.github.com/repos/peholmst/vaadin4spring/pulls/comments/{number}","comments_url":"https://api.github.com/repos/peholmst/vaadin4spring/issues/195/comments","statuses_url":"https://api.github.com/repos/peholmst/vaadin4spring/statuses/261f0914d0609871662e8f9d1b59542229606bc8","head":{"label":"GJRTimmer:dev/#190","ref":"dev/#190","sha":"261f0914d0609871662e8f9d1b59542229606bc8","user":{"login":"GJRTimmer","id":6072255,"avatar_url":"https://avatars.githubusercontent.com/u/6072255?v=3","gravatar_id":"","url":"https://api.github.com/users/GJRTimmer","html_url":"https://github.com/GJRTimmer","followers_url":"https://api.github.com/users/GJRTimmer/followers","following_url":"https://api.github.com/users/GJRTimmer/following{/other_user}","gists_url":"https://api.github.com/users/GJRTimmer/gists{/gist_id}","starred_url":"https://api.github.com/users/GJRTimmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GJRTimmer/subscriptions","organizations_url":"https://api.github.com/users/GJRTimmer/orgs","repos_url":"https://api.github.com/users/GJRTimmer/repos","events_url":"https://api.github.com/users/GJRTimmer/events{/privacy}","received_events_url":"https://api.github.com/users/GJRTimmer/received_events","type":"User","site_admin":false},"repo":{"id":28423185,"name":"vaadin4spring","full_name":"GJRTimmer/vaadin4spring","owner":{"login":"GJRTimmer","id":6072255,"avatar_url":"https://avatars.githubusercontent.com/u/6072255?v=3","gravatar_id":"","url":"https://api.github.com/users/GJRTimmer","html_url":"https://github.com/GJRTimmer","followers_url":"https://api.github.com/users/GJRTimmer/followers","following_url":"https://api.github.com/users/GJRTimmer/following{/other_user}","gists_url":"https://api.github.com/users/GJRTimmer/gists{/gist_id}","starred_url":"https://api.github.com/users/GJRTimmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GJRTimmer/subscriptions","organizations_url":"https://api.github.com/users/GJRTimmer/orgs","repos_url":"https://api.github.com/users/GJRTimmer/repos","events_url":"https://api.github.com/users/GJRTimmer/events{/privacy}","received_events_url":"https://api.github.com/users/GJRTimmer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/GJRTimmer/vaadin4spring","description":"Vaadin integration for Spring and Spring Boot","fork":true,"url":"https://api.github.com/repos/GJRTimmer/vaadin4spring","forks_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/forks","keys_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/teams","hooks_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/hooks","issue_events_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/issues/events{/number}","events_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/events","assignees_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/assignees{/user}","branches_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/branches{/branch}","tags_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/tags","blobs_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/git/refs{/sha}","trees_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/statuses/{sha}","languages_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/languages","stargazers_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/stargazers","contributors_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/contributors","subscribers_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/subscribers","subscription_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/subscription","commits_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/commits{/sha}","git_commits_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/git/commits{/sha}","comments_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/comments{/number}","issue_comment_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/issues/comments/{number}","contents_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/contents/{+path}","compare_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/merges","archive_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/downloads","issues_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/issues{/number}","pulls_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/pulls{/number}","milestones_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/milestones{/number}","notifications_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/labels{/name}","releases_url":"https://api.github.com/repos/GJRTimmer/vaadin4spring/releases{/id}","created_at":"2014-12-23T22:41:31Z","updated_at":"2015-02-20T07:36:39Z","pushed_at":"2015-02-20T15:19:10Z","git_url":"git://github.com/GJRTimmer/vaadin4spring.git","ssh_url":"git@github.com:GJRTimmer/vaadin4spring.git","clone_url":"https://github.com/GJRTimmer/vaadin4spring.git","svn_url":"https://github.com/GJRTimmer/vaadin4spring","homepage":null,"size":1994,"stargazers_count":1,"watchers_count":1,"language":"Java","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":1,"default_branch":"master"}},"base":{"label":"peholmst:master","ref":"master","sha":"e9207e803f3ad60a7d4bb8c382e4c90d7861a0e9","user":{"login":"peholmst","id":193337,"avatar_url":"https://avatars.githubusercontent.com/u/193337?v=3","gravatar_id":"","url":"https://api.github.com/users/peholmst","html_url":"https://github.com/peholmst","followers_url":"https://api.github.com/users/peholmst/followers","following_url":"https://api.github.com/users/peholmst/following{/other_user}","gists_url":"https://api.github.com/users/peholmst/gists{/gist_id}","starred_url":"https://api.github.com/users/peholmst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peholmst/subscriptions","organizations_url":"https://api.github.com/users/peholmst/orgs","repos_url":"https://api.github.com/users/peholmst/repos","events_url":"https://api.github.com/users/peholmst/events{/privacy}","received_events_url":"https://api.github.com/users/peholmst/received_events","type":"User","site_admin":false},"repo":{"id":16338894,"name":"vaadin4spring","full_name":"peholmst/vaadin4spring","owner":{"login":"peholmst","id":193337,"avatar_url":"https://avatars.githubusercontent.com/u/193337?v=3","gravatar_id":"","url":"https://api.github.com/users/peholmst","html_url":"https://github.com/peholmst","followers_url":"https://api.github.com/users/peholmst/followers","following_url":"https://api.github.com/users/peholmst/following{/other_user}","gists_url":"https://api.github.com/users/peholmst/gists{/gist_id}","starred_url":"https://api.github.com/users/peholmst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peholmst/subscriptions","organizations_url":"https://api.github.com/users/peholmst/orgs","repos_url":"https://api.github.com/users/peholmst/repos","events_url":"https://api.github.com/users/peholmst/events{/privacy}","received_events_url":"https://api.github.com/users/peholmst/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/peholmst/vaadin4spring","description":"Vaadin integration for Spring and Spring Boot","fork":false,"url":"https://api.github.com/repos/peholmst/vaadin4spring","forks_url":"https://api.github.com/repos/peholmst/vaadin4spring/forks","keys_url":"https://api.github.com/repos/peholmst/vaadin4spring/keys{/key_id}","collaborators_url":"https://api.github.com/repos/peholmst/vaadin4spring/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/peholmst/vaadin4spring/teams","hooks_url":"https://api.github.com/repos/peholmst/vaadin4spring/hooks","issue_events_url":"https://api.github.com/repos/peholmst/vaadin4spring/issues/events{/number}","events_url":"https://api.github.com/repos/peholmst/vaadin4spring/events","assignees_url":"https://api.github.com/repos/peholmst/vaadin4spring/assignees{/user}","branches_url":"https://api.github.com/repos/peholmst/vaadin4spring/branches{/branch}","tags_url":"https://api.github.com/repos/peholmst/vaadin4spring/tags","blobs_url":"https://api.github.com/repos/peholmst/vaadin4spring/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/peholmst/vaadin4spring/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/peholmst/vaadin4spring/git/refs{/sha}","trees_url":"https://api.github.com/repos/peholmst/vaadin4spring/git/trees{/sha}","statuses_url":"https://api.github.com/repos/peholmst/vaadin4spring/statuses/{sha}","languages_url":"https://api.github.com/repos/peholmst/vaadin4spring/languages","stargazers_url":"https://api.github.com/repos/peholmst/vaadin4spring/stargazers","contributors_url":"https://api.github.com/repos/peholmst/vaadin4spring/contributors","subscribers_url":"https://api.github.com/repos/peholmst/vaadin4spring/subscribers","subscription_url":"https://api.github.com/repos/peholmst/vaadin4spring/subscription","commits_url":"https://api.github.com/repos/peholmst/vaadin4spring/commits{/sha}","git_commits_url":"https://api.github.com/repos/peholmst/vaadin4spring/git/commits{/sha}","comments_url":"https://api.github.com/repos/peholmst/vaadin4spring/comments{/number}","issue_comment_url":"https://api.github.com/repos/peholmst/vaadin4spring/issues/comments/{number}","contents_url":"https://api.github.com/repos/peholmst/vaadin4spring/contents/{+path}","compare_url":"https://api.github.com/repos/peholmst/vaadin4spring/compare/{base}...{head}","merges_url":"https://api.github.com/repos/peholmst/vaadin4spring/merges","archive_url":"https://api.github.com/repos/peholmst/vaadin4spring/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/peholmst/vaadin4spring/downloads","issues_url":"https://api.github.com/repos/peholmst/vaadin4spring/issues{/number}","pulls_url":"https://api.github.com/repos/peholmst/vaadin4spring/pulls{/number}","milestones_url":"https://api.github.com/repos/peholmst/vaadin4spring/milestones{/number}","notifications_url":"https://api.github.com/repos/peholmst/vaadin4spring/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/peholmst/vaadin4spring/labels{/name}","releases_url":"https://api.github.com/repos/peholmst/vaadin4spring/releases{/id}","created_at":"2014-01-29T08:11:11Z","updated_at":"2015-02-20T06:36:08Z","pushed_at":"2015-02-20T06:36:07Z","git_url":"git://github.com/peholmst/vaadin4spring.git","ssh_url":"git@github.com:peholmst/vaadin4spring.git","clone_url":"https://github.com/peholmst/vaadin4spring.git","svn_url":"https://github.com/peholmst/vaadin4spring","homepage":null,"size":3732,"stargazers_count":130,"watchers_count":130,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":51,"mirror_url":null,"open_issues_count":39,"forks":51,"open_issues":39,"watchers":130,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/peholmst/vaadin4spring/pulls/195"},"html":{"href":"https://github.com/peholmst/vaadin4spring/pull/195"},"issue":{"href":"https://api.github.com/repos/peholmst/vaadin4spring/issues/195"},"comments":{"href":"https://api.github.com/repos/peholmst/vaadin4spring/issues/195/comments"},"review_comments":{"href":"https://api.github.com/repos/peholmst/vaadin4spring/pulls/195/comments"},"review_comment":{"href":"https://api.github.com/repos/peholmst/vaadin4spring/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/peholmst/vaadin4spring/pulls/195/commits"},"statuses":{"href":"https://api.github.com/repos/peholmst/vaadin4spring/statuses/261f0914d0609871662e8f9d1b59542229606bc8"}}}}