{"action":"closed","number":88,"pull_request":{"url":"https://api.github.com/repos/schaloner/deadbolt-2-java/pulls/88","id":171917477,"html_url":"https://github.com/schaloner/deadbolt-2-java/pull/88","diff_url":"https://github.com/schaloner/deadbolt-2-java/pull/88.diff","patch_url":"https://github.com/schaloner/deadbolt-2-java/pull/88.patch","issue_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/issues/88","number":88,"state":"closed","locked":false,"title":"AND/OR mode for @Pattern constraint","user":{"login":"mkurz","id":644927,"avatar_url":"https://avatars2.githubusercontent.com/u/644927?v=4","gravatar_id":"","url":"https://api.github.com/users/mkurz","html_url":"https://github.com/mkurz","followers_url":"https://api.github.com/users/mkurz/followers","following_url":"https://api.github.com/users/mkurz/following{/other_user}","gists_url":"https://api.github.com/users/mkurz/gists{/gist_id}","starred_url":"https://api.github.com/users/mkurz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkurz/subscriptions","organizations_url":"https://api.github.com/users/mkurz/orgs","repos_url":"https://api.github.com/users/mkurz/repos","events_url":"https://api.github.com/users/mkurz/events{/privacy}","received_events_url":"https://api.github.com/users/mkurz/received_events","type":"User","site_admin":false},"body":"Fully backwards compatible.\r\n\r\nAllows us to to write awesome stuff like:\r\n```java\r\n// subject needs to have both permissions\r\n@Pattern(value = { \"curator.museum.insects\", \"killer.undead.zombie\" }, mode = AND)\r\n\r\n// subject needs to have one of these permissions\r\n@Pattern(value = { \"curator.museum.insects\", \"killer.undead.zombie\" }, mode = OR)\r\n```\r\n\r\nTogether with the `deadbolt.java.constraint-mode` setting this is really useful. E.g. you could set `deadbolt.java.constraint-mode = AND`, annotate the controller with `@Restrict(...)` to only allow certain roles and on the method method you can then require that this role has x *or* y permission to access that action method. Nice.","created_at":"2018-02-28T10:49:10Z","updated_at":"2018-02-28T11:26:41Z","closed_at":"2018-02-28T11:26:41Z","merged_at":"2018-02-28T11:26:41Z","merge_commit_sha":"46bc808f61f80aa8f42bc7c9d01140254896b684","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/pulls/88/commits","review_comments_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/pulls/88/comments","review_comment_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/issues/88/comments","statuses_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/statuses/e9fba2bde8cd5e8345a6debb3335d79cae03a42c","head":{"label":"mkurz:constraintModeInsideAnnotations","ref":"constraintModeInsideAnnotations","sha":"e9fba2bde8cd5e8345a6debb3335d79cae03a42c","user":{"login":"mkurz","id":644927,"avatar_url":"https://avatars2.githubusercontent.com/u/644927?v=4","gravatar_id":"","url":"https://api.github.com/users/mkurz","html_url":"https://github.com/mkurz","followers_url":"https://api.github.com/users/mkurz/followers","following_url":"https://api.github.com/users/mkurz/following{/other_user}","gists_url":"https://api.github.com/users/mkurz/gists{/gist_id}","starred_url":"https://api.github.com/users/mkurz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkurz/subscriptions","organizations_url":"https://api.github.com/users/mkurz/orgs","repos_url":"https://api.github.com/users/mkurz/repos","events_url":"https://api.github.com/users/mkurz/events{/privacy}","received_events_url":"https://api.github.com/users/mkurz/received_events","type":"User","site_admin":false},"repo":{"id":39123860,"name":"deadbolt-2-java","full_name":"mkurz/deadbolt-2-java","owner":{"login":"mkurz","id":644927,"avatar_url":"https://avatars2.githubusercontent.com/u/644927?v=4","gravatar_id":"","url":"https://api.github.com/users/mkurz","html_url":"https://github.com/mkurz","followers_url":"https://api.github.com/users/mkurz/followers","following_url":"https://api.github.com/users/mkurz/following{/other_user}","gists_url":"https://api.github.com/users/mkurz/gists{/gist_id}","starred_url":"https://api.github.com/users/mkurz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkurz/subscriptions","organizations_url":"https://api.github.com/users/mkurz/orgs","repos_url":"https://api.github.com/users/mkurz/repos","events_url":"https://api.github.com/users/mkurz/events{/privacy}","received_events_url":"https://api.github.com/users/mkurz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mkurz/deadbolt-2-java","description":"Idiomatic Java API for Deadbolt 2","fork":true,"url":"https://api.github.com/repos/mkurz/deadbolt-2-java","forks_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/forks","keys_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/teams","hooks_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/hooks","issue_events_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/issues/events{/number}","events_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/events","assignees_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/assignees{/user}","branches_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/branches{/branch}","tags_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/tags","blobs_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/statuses/{sha}","languages_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/languages","stargazers_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/stargazers","contributors_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/contributors","subscribers_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/subscribers","subscription_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/subscription","commits_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/contents/{+path}","compare_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/merges","archive_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/downloads","issues_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/issues{/number}","pulls_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/pulls{/number}","milestones_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/milestones{/number}","notifications_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/labels{/name}","releases_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/releases{/id}","deployments_url":"https://api.github.com/repos/mkurz/deadbolt-2-java/deployments","created_at":"2015-07-15T07:54:16Z","updated_at":"2016-04-12T17:28:31Z","pushed_at":"2018-02-28T11:08:35Z","git_url":"git://github.com/mkurz/deadbolt-2-java.git","ssh_url":"git@github.com:mkurz/deadbolt-2-java.git","clone_url":"https://github.com/mkurz/deadbolt-2-java.git","svn_url":"https://github.com/mkurz/deadbolt-2-java","homepage":null,"size":1929,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"schaloner:master","ref":"master","sha":"3f4ac3d4743e8016bde975bf452544e38dfc6551","user":{"login":"schaloner","id":456058,"avatar_url":"https://avatars3.githubusercontent.com/u/456058?v=4","gravatar_id":"","url":"https://api.github.com/users/schaloner","html_url":"https://github.com/schaloner","followers_url":"https://api.github.com/users/schaloner/followers","following_url":"https://api.github.com/users/schaloner/following{/other_user}","gists_url":"https://api.github.com/users/schaloner/gists{/gist_id}","starred_url":"https://api.github.com/users/schaloner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schaloner/subscriptions","organizations_url":"https://api.github.com/users/schaloner/orgs","repos_url":"https://api.github.com/users/schaloner/repos","events_url":"https://api.github.com/users/schaloner/events{/privacy}","received_events_url":"https://api.github.com/users/schaloner/received_events","type":"User","site_admin":false},"repo":{"id":7118553,"name":"deadbolt-2-java","full_name":"schaloner/deadbolt-2-java","owner":{"login":"schaloner","id":456058,"avatar_url":"https://avatars3.githubusercontent.com/u/456058?v=4","gravatar_id":"","url":"https://api.github.com/users/schaloner","html_url":"https://github.com/schaloner","followers_url":"https://api.github.com/users/schaloner/followers","following_url":"https://api.github.com/users/schaloner/following{/other_user}","gists_url":"https://api.github.com/users/schaloner/gists{/gist_id}","starred_url":"https://api.github.com/users/schaloner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schaloner/subscriptions","organizations_url":"https://api.github.com/users/schaloner/orgs","repos_url":"https://api.github.com/users/schaloner/repos","events_url":"https://api.github.com/users/schaloner/events{/privacy}","received_events_url":"https://api.github.com/users/schaloner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/schaloner/deadbolt-2-java","description":"Idiomatic Java API for Deadbolt 2","fork":false,"url":"https://api.github.com/repos/schaloner/deadbolt-2-java","forks_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/forks","keys_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/teams","hooks_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/hooks","issue_events_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/issues/events{/number}","events_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/events","assignees_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/assignees{/user}","branches_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/branches{/branch}","tags_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/tags","blobs_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/statuses/{sha}","languages_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/languages","stargazers_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/stargazers","contributors_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/contributors","subscribers_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/subscribers","subscription_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/subscription","commits_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/contents/{+path}","compare_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/merges","archive_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/downloads","issues_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/issues{/number}","pulls_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/pulls{/number}","milestones_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/milestones{/number}","notifications_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/labels{/name}","releases_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/releases{/id}","deployments_url":"https://api.github.com/repos/schaloner/deadbolt-2-java/deployments","created_at":"2012-12-11T20:11:05Z","updated_at":"2017-10-03T02:59:50Z","pushed_at":"2018-02-28T11:26:41Z","git_url":"git://github.com/schaloner/deadbolt-2-java.git","ssh_url":"git@github.com:schaloner/deadbolt-2-java.git","clone_url":"https://github.com/schaloner/deadbolt-2-java.git","svn_url":"https://github.com/schaloner/deadbolt-2-java","homepage":null,"size":1937,"stargazers_count":49,"watchers_count":49,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":29,"open_issues":8,"watchers":49,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/schaloner/deadbolt-2-java/pulls/88"},"html":{"href":"https://github.com/schaloner/deadbolt-2-java/pull/88"},"issue":{"href":"https://api.github.com/repos/schaloner/deadbolt-2-java/issues/88"},"comments":{"href":"https://api.github.com/repos/schaloner/deadbolt-2-java/issues/88/comments"},"review_comments":{"href":"https://api.github.com/repos/schaloner/deadbolt-2-java/pulls/88/comments"},"review_comment":{"href":"https://api.github.com/repos/schaloner/deadbolt-2-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/schaloner/deadbolt-2-java/pulls/88/commits"},"statuses":{"href":"https://api.github.com/repos/schaloner/deadbolt-2-java/statuses/e9fba2bde8cd5e8345a6debb3335d79cae03a42c"}},"author_association":"COLLABORATOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"mkurz","id":644927,"avatar_url":"https://avatars2.githubusercontent.com/u/644927?v=4","gravatar_id":"","url":"https://api.github.com/users/mkurz","html_url":"https://github.com/mkurz","followers_url":"https://api.github.com/users/mkurz/followers","following_url":"https://api.github.com/users/mkurz/following{/other_user}","gists_url":"https://api.github.com/users/mkurz/gists{/gist_id}","starred_url":"https://api.github.com/users/mkurz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkurz/subscriptions","organizations_url":"https://api.github.com/users/mkurz/orgs","repos_url":"https://api.github.com/users/mkurz/repos","events_url":"https://api.github.com/users/mkurz/events{/privacy}","received_events_url":"https://api.github.com/users/mkurz/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":351,"deletions":36,"changed_files":9}}
{"actor":{"display_login":"mkurz"}}