{"action":"opened","number":2848,"pull_request":{"url":"https://api.github.com/repos/compucorp/civihr/pulls/2848","id":212125111,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyMTI1MTEx","html_url":"https://github.com/compucorp/civihr/pull/2848","diff_url":"https://github.com/compucorp/civihr/pull/2848.diff","patch_url":"https://github.com/compucorp/civihr/pull/2848.patch","issue_url":"https://api.github.com/repos/compucorp/civihr/issues/2848","number":2848,"state":"open","locked":false,"title":"PCHR-4150: Grant HR Admin access to message template menu","user":{"login":"ajesamson","id":1507645,"node_id":"MDQ6VXNlcjE1MDc2NDU=","avatar_url":"https://avatars2.githubusercontent.com/u/1507645?v=4","gravatar_id":"","url":"https://api.github.com/users/ajesamson","html_url":"https://github.com/ajesamson","followers_url":"https://api.github.com/users/ajesamson/followers","following_url":"https://api.github.com/users/ajesamson/following{/other_user}","gists_url":"https://api.github.com/users/ajesamson/gists{/gist_id}","starred_url":"https://api.github.com/users/ajesamson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajesamson/subscriptions","organizations_url":"https://api.github.com/users/ajesamson/orgs","repos_url":"https://api.github.com/users/ajesamson/repos","events_url":"https://api.github.com/users/ajesamson/events{/privacy}","received_events_url":"https://api.github.com/users/ajesamson/received_events","type":"User","site_admin":false},"body":"## Overview\r\nIn order to access the `message template menu`, permission to `access root menu items and configurations` is required. This does not give `HR admin` access to the page even though they have access to a granular permission - `edit user-driven message templates`. This PR adds the two new granular permissions to the existing permission.\r\n\r\n## Before\r\n<img width=\"196\" alt=\"before_permission\" src=\"https://user-images.githubusercontent.com/1507645/44862585-e8fdda80-ac72-11e8-8aea-87e34e3ec210.png\">\r\n\r\n\r\n## After\r\n<img width=\"246\" alt=\"after_permission\" src=\"https://user-images.githubusercontent.com/1507645/44862599-f0bd7f00-ac72-11e8-9ed0-332cf2ec96d5.png\">\r\n\r\n\r\n## Technical Details\r\nThe permissions for both `Communications` and `Message Templates` were modified to ensure it grants access to users with any of the following permission - \r\n* access root menu items and configurations\r\n* edit system workflow message templates\r\n* edit user-driven message templates\r\n\r\n```\r\n'api.Navigation.create' => [\r\n  'id' => '$value.id',\r\n  'permission' => implode(',', $permissions),\r\n  'permission_operator' => 'OR'\r\n],\r\n```\r\n\r\n## Comments\r\nThe permissions were created using this PR [543](https://github.com/compucorp/civihr-employee-portal/pull/543)\r\n","created_at":"2018-08-30T15:42:46Z","updated_at":"2018-08-30T15:42:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/compucorp/civihr/pulls/2848/commits","review_comments_url":"https://api.github.com/repos/compucorp/civihr/pulls/2848/comments","review_comment_url":"https://api.github.com/repos/compucorp/civihr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/compucorp/civihr/issues/2848/comments","statuses_url":"https://api.github.com/repos/compucorp/civihr/statuses/96a307babed2dfe5c4c87fc66ebe7df917e8d009","head":{"label":"compucorp:PCHR-4150-grant-hr-admin-access-to-message-template-menu","ref":"PCHR-4150-grant-hr-admin-access-to-message-template-menu","sha":"96a307babed2dfe5c4c87fc66ebe7df917e8d009","user":{"login":"compucorp","id":2040164,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNDAxNjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2040164?v=4","gravatar_id":"","url":"https://api.github.com/users/compucorp","html_url":"https://github.com/compucorp","followers_url":"https://api.github.com/users/compucorp/followers","following_url":"https://api.github.com/users/compucorp/following{/other_user}","gists_url":"https://api.github.com/users/compucorp/gists{/gist_id}","starred_url":"https://api.github.com/users/compucorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/compucorp/subscriptions","organizations_url":"https://api.github.com/users/compucorp/orgs","repos_url":"https://api.github.com/users/compucorp/repos","events_url":"https://api.github.com/users/compucorp/events{/privacy}","received_events_url":"https://api.github.com/users/compucorp/received_events","type":"Organization","site_admin":false},"repo":{"id":10086903,"node_id":"MDEwOlJlcG9zaXRvcnkxMDA4NjkwMw==","name":"civihr","full_name":"compucorp/civihr","owner":{"login":"compucorp","id":2040164,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNDAxNjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2040164?v=4","gravatar_id":"","url":"https://api.github.com/users/compucorp","html_url":"https://github.com/compucorp","followers_url":"https://api.github.com/users/compucorp/followers","following_url":"https://api.github.com/users/compucorp/following{/other_user}","gists_url":"https://api.github.com/users/compucorp/gists{/gist_id}","starred_url":"https://api.github.com/users/compucorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/compucorp/subscriptions","organizations_url":"https://api.github.com/users/compucorp/orgs","repos_url":"https://api.github.com/users/compucorp/repos","events_url":"https://api.github.com/users/compucorp/events{/privacy}","received_events_url":"https://api.github.com/users/compucorp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/compucorp/civihr","description":"CiviHR","fork":false,"url":"https://api.github.com/repos/compucorp/civihr","forks_url":"https://api.github.com/repos/compucorp/civihr/forks","keys_url":"https://api.github.com/repos/compucorp/civihr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/compucorp/civihr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/compucorp/civihr/teams","hooks_url":"https://api.github.com/repos/compucorp/civihr/hooks","issue_events_url":"https://api.github.com/repos/compucorp/civihr/issues/events{/number}","events_url":"https://api.github.com/repos/compucorp/civihr/events","assignees_url":"https://api.github.com/repos/compucorp/civihr/assignees{/user}","branches_url":"https://api.github.com/repos/compucorp/civihr/branches{/branch}","tags_url":"https://api.github.com/repos/compucorp/civihr/tags","blobs_url":"https://api.github.com/repos/compucorp/civihr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/compucorp/civihr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/compucorp/civihr/git/refs{/sha}","trees_url":"https://api.github.com/repos/compucorp/civihr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/compucorp/civihr/statuses/{sha}","languages_url":"https://api.github.com/repos/compucorp/civihr/languages","stargazers_url":"https://api.github.com/repos/compucorp/civihr/stargazers","contributors_url":"https://api.github.com/repos/compucorp/civihr/contributors","subscribers_url":"https://api.github.com/repos/compucorp/civihr/subscribers","subscription_url":"https://api.github.com/repos/compucorp/civihr/subscription","commits_url":"https://api.github.com/repos/compucorp/civihr/commits{/sha}","git_commits_url":"https://api.github.com/repos/compucorp/civihr/git/commits{/sha}","comments_url":"https://api.github.com/repos/compucorp/civihr/comments{/number}","issue_comment_url":"https://api.github.com/repos/compucorp/civihr/issues/comments{/number}","contents_url":"https://api.github.com/repos/compucorp/civihr/contents/{+path}","compare_url":"https://api.github.com/repos/compucorp/civihr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/compucorp/civihr/merges","archive_url":"https://api.github.com/repos/compucorp/civihr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/compucorp/civihr/downloads","issues_url":"https://api.github.com/repos/compucorp/civihr/issues{/number}","pulls_url":"https://api.github.com/repos/compucorp/civihr/pulls{/number}","milestones_url":"https://api.github.com/repos/compucorp/civihr/milestones{/number}","notifications_url":"https://api.github.com/repos/compucorp/civihr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/compucorp/civihr/labels{/name}","releases_url":"https://api.github.com/repos/compucorp/civihr/releases{/id}","deployments_url":"https://api.github.com/repos/compucorp/civihr/deployments","created_at":"2013-05-15T20:06:06Z","updated_at":"2018-08-29T13:35:23Z","pushed_at":"2018-08-30T15:21:52Z","git_url":"git://github.com/compucorp/civihr.git","ssh_url":"git@github.com:compucorp/civihr.git","clone_url":"https://github.com/compucorp/civihr.git","svn_url":"https://github.com/compucorp/civihr","homepage":null,"size":67124,"stargazers_count":32,"watchers_count":32,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":43,"mirror_url":null,"archived":false,"open_issues_count":8,"license":null,"forks":43,"open_issues":8,"watchers":32,"default_branch":"staging"}},"base":{"label":"compucorp:PCHR-3488-permission-to-edit-message-templates","ref":"PCHR-3488-permission-to-edit-message-templates","sha":"e90f4f4281f2d6cd9f5e2847fcc0c7c04b9df077","user":{"login":"compucorp","id":2040164,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNDAxNjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2040164?v=4","gravatar_id":"","url":"https://api.github.com/users/compucorp","html_url":"https://github.com/compucorp","followers_url":"https://api.github.com/users/compucorp/followers","following_url":"https://api.github.com/users/compucorp/following{/other_user}","gists_url":"https://api.github.com/users/compucorp/gists{/gist_id}","starred_url":"https://api.github.com/users/compucorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/compucorp/subscriptions","organizations_url":"https://api.github.com/users/compucorp/orgs","repos_url":"https://api.github.com/users/compucorp/repos","events_url":"https://api.github.com/users/compucorp/events{/privacy}","received_events_url":"https://api.github.com/users/compucorp/received_events","type":"Organization","site_admin":false},"repo":{"id":10086903,"node_id":"MDEwOlJlcG9zaXRvcnkxMDA4NjkwMw==","name":"civihr","full_name":"compucorp/civihr","owner":{"login":"compucorp","id":2040164,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNDAxNjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2040164?v=4","gravatar_id":"","url":"https://api.github.com/users/compucorp","html_url":"https://github.com/compucorp","followers_url":"https://api.github.com/users/compucorp/followers","following_url":"https://api.github.com/users/compucorp/following{/other_user}","gists_url":"https://api.github.com/users/compucorp/gists{/gist_id}","starred_url":"https://api.github.com/users/compucorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/compucorp/subscriptions","organizations_url":"https://api.github.com/users/compucorp/orgs","repos_url":"https://api.github.com/users/compucorp/repos","events_url":"https://api.github.com/users/compucorp/events{/privacy}","received_events_url":"https://api.github.com/users/compucorp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/compucorp/civihr","description":"CiviHR","fork":false,"url":"https://api.github.com/repos/compucorp/civihr","forks_url":"https://api.github.com/repos/compucorp/civihr/forks","keys_url":"https://api.github.com/repos/compucorp/civihr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/compucorp/civihr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/compucorp/civihr/teams","hooks_url":"https://api.github.com/repos/compucorp/civihr/hooks","issue_events_url":"https://api.github.com/repos/compucorp/civihr/issues/events{/number}","events_url":"https://api.github.com/repos/compucorp/civihr/events","assignees_url":"https://api.github.com/repos/compucorp/civihr/assignees{/user}","branches_url":"https://api.github.com/repos/compucorp/civihr/branches{/branch}","tags_url":"https://api.github.com/repos/compucorp/civihr/tags","blobs_url":"https://api.github.com/repos/compucorp/civihr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/compucorp/civihr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/compucorp/civihr/git/refs{/sha}","trees_url":"https://api.github.com/repos/compucorp/civihr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/compucorp/civihr/statuses/{sha}","languages_url":"https://api.github.com/repos/compucorp/civihr/languages","stargazers_url":"https://api.github.com/repos/compucorp/civihr/stargazers","contributors_url":"https://api.github.com/repos/compucorp/civihr/contributors","subscribers_url":"https://api.github.com/repos/compucorp/civihr/subscribers","subscription_url":"https://api.github.com/repos/compucorp/civihr/subscription","commits_url":"https://api.github.com/repos/compucorp/civihr/commits{/sha}","git_commits_url":"https://api.github.com/repos/compucorp/civihr/git/commits{/sha}","comments_url":"https://api.github.com/repos/compucorp/civihr/comments{/number}","issue_comment_url":"https://api.github.com/repos/compucorp/civihr/issues/comments{/number}","contents_url":"https://api.github.com/repos/compucorp/civihr/contents/{+path}","compare_url":"https://api.github.com/repos/compucorp/civihr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/compucorp/civihr/merges","archive_url":"https://api.github.com/repos/compucorp/civihr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/compucorp/civihr/downloads","issues_url":"https://api.github.com/repos/compucorp/civihr/issues{/number}","pulls_url":"https://api.github.com/repos/compucorp/civihr/pulls{/number}","milestones_url":"https://api.github.com/repos/compucorp/civihr/milestones{/number}","notifications_url":"https://api.github.com/repos/compucorp/civihr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/compucorp/civihr/labels{/name}","releases_url":"https://api.github.com/repos/compucorp/civihr/releases{/id}","deployments_url":"https://api.github.com/repos/compucorp/civihr/deployments","created_at":"2013-05-15T20:06:06Z","updated_at":"2018-08-29T13:35:23Z","pushed_at":"2018-08-30T15:21:52Z","git_url":"git://github.com/compucorp/civihr.git","ssh_url":"git@github.com:compucorp/civihr.git","clone_url":"https://github.com/compucorp/civihr.git","svn_url":"https://github.com/compucorp/civihr","homepage":null,"size":67124,"stargazers_count":32,"watchers_count":32,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":43,"mirror_url":null,"archived":false,"open_issues_count":8,"license":null,"forks":43,"open_issues":8,"watchers":32,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/compucorp/civihr/pulls/2848"},"html":{"href":"https://github.com/compucorp/civihr/pull/2848"},"issue":{"href":"https://api.github.com/repos/compucorp/civihr/issues/2848"},"comments":{"href":"https://api.github.com/repos/compucorp/civihr/issues/2848/comments"},"review_comments":{"href":"https://api.github.com/repos/compucorp/civihr/pulls/2848/comments"},"review_comment":{"href":"https://api.github.com/repos/compucorp/civihr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/compucorp/civihr/pulls/2848/commits"},"statuses":{"href":"https://api.github.com/repos/compucorp/civihr/statuses/96a307babed2dfe5c4c87fc66ebe7df917e8d009"}},"author_association":"COLLABORATOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":56,"deletions":0,"changed_files":2}}
{"actor":{"display_login":"ajesamson"}}