{"action":"created","comment":{"url":"https://api.github.com/repos/opencats/OpenCATS/pulls/comments/72597244","id":72597244,"diff_hunk":"@@ -396,8 +398,37 @@ public function isDateDMY()\n     }\n \n     // FIXME: Document me!\n-    public function getAccessLevel()\n+    public function getAccessLevel($securedObjectName)\n     {\n+        $ACL = ACL::getInstance();\n+        $permissions = $ACL->permissions;","path":"lib/Session.php","position":null,"original_position":28,"commit_id":"0eb574bdc9d7bc71dfa8e2d1c8ca878438e159bf","original_commit_id":"edbfbeadf5e0785d0da2e7c785bc8514d23553b7","user":{"login":"skrchnavy","id":7057580,"avatar_url":"https://avatars.githubusercontent.com/u/7057580?v=3","gravatar_id":"","url":"https://api.github.com/users/skrchnavy","html_url":"https://github.com/skrchnavy","followers_url":"https://api.github.com/users/skrchnavy/followers","following_url":"https://api.github.com/users/skrchnavy/following{/other_user}","gists_url":"https://api.github.com/users/skrchnavy/gists{/gist_id}","starred_url":"https://api.github.com/users/skrchnavy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skrchnavy/subscriptions","organizations_url":"https://api.github.com/users/skrchnavy/orgs","repos_url":"https://api.github.com/users/skrchnavy/repos","events_url":"https://api.github.com/users/skrchnavy/events{/privacy}","received_events_url":"https://api.github.com/users/skrchnavy/received_events","type":"User","site_admin":false},"body":"this comment addressed in commit 1f441e88f1e4b36ec8f676bb39e8ff6351d33c13 ","created_at":"2016-07-28T10:14:00Z","updated_at":"2016-07-28T10:14:00Z","html_url":"https://github.com/opencats/OpenCATS/pull/91#discussion_r72597244","pull_request_url":"https://api.github.com/repos/opencats/OpenCATS/pulls/91","_links":{"self":{"href":"https://api.github.com/repos/opencats/OpenCATS/pulls/comments/72597244"},"html":{"href":"https://github.com/opencats/OpenCATS/pull/91#discussion_r72597244"},"pull_request":{"href":"https://api.github.com/repos/opencats/OpenCATS/pulls/91"}}},"pull_request":{"url":"https://api.github.com/repos/opencats/OpenCATS/pulls/91","id":78803780,"html_url":"https://github.com/opencats/OpenCATS/pull/91","diff_url":"https://github.com/opencats/OpenCATS/pull/91.diff","patch_url":"https://github.com/opencats/OpenCATS/pull/91.patch","issue_url":"https://api.github.com/repos/opencats/OpenCATS/issues/91","number":91,"state":"open","locked":false,"title":"Security improvements using secured objects","user":{"login":"skrchnavy","id":7057580,"avatar_url":"https://avatars.githubusercontent.com/u/7057580?v=3","gravatar_id":"","url":"https://api.github.com/users/skrchnavy","html_url":"https://github.com/skrchnavy","followers_url":"https://api.github.com/users/skrchnavy/followers","following_url":"https://api.github.com/users/skrchnavy/following{/other_user}","gists_url":"https://api.github.com/users/skrchnavy/gists{/gist_id}","starred_url":"https://api.github.com/users/skrchnavy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skrchnavy/subscriptions","organizations_url":"https://api.github.com/users/skrchnavy/orgs","repos_url":"https://api.github.com/users/skrchnavy/repos","events_url":"https://api.github.com/users/skrchnavy/events{/privacy}","received_events_url":"https://api.github.com/users/skrchnavy/received_events","type":"User","site_admin":false},"body":"As proposed in this topic in forum: https://groups.google.com/forum/#!topic/opencats-dev/MgZPtihEJ_M this is implementation of improved access level check based on secured objects.\r\n\r\nIt is backward compatible, so when no permissions defined per object, access level of defined user is used.\r\nChanges made:\r\n* changed implementation of Session::getAccessLevel\r\n  * _Open question: shall we treat default access level for user to be maximum access level?_\r\n* checks of access level in modules moved to handle request\r\n* some public modules functions made private (not used out of class)\r\n* menu (tabs/subtabs) access level checks also for secured object name (documented in function).\r\n\r\nWhat is not finished / needs further development\r\n* access level check not added into all places (only where it was used)\r\n* secured object names corrections, simplification\r\n* reading permissions / access levels (ACL) from a configuration file\r\n* tabs/subtabs to be displayed based on permissions also for read only access\r\n* automatic tests for different configuration of permissions\r\n","created_at":"2016-07-26T07:28:59Z","updated_at":"2016-07-28T10:14:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"23036acbfba1e95c4eb4e43807edb4a4fe8ecd13","assignee":{"login":"skrchnavy","id":7057580,"avatar_url":"https://avatars.githubusercontent.com/u/7057580?v=3","gravatar_id":"","url":"https://api.github.com/users/skrchnavy","html_url":"https://github.com/skrchnavy","followers_url":"https://api.github.com/users/skrchnavy/followers","following_url":"https://api.github.com/users/skrchnavy/following{/other_user}","gists_url":"https://api.github.com/users/skrchnavy/gists{/gist_id}","starred_url":"https://api.github.com/users/skrchnavy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skrchnavy/subscriptions","organizations_url":"https://api.github.com/users/skrchnavy/orgs","repos_url":"https://api.github.com/users/skrchnavy/repos","events_url":"https://api.github.com/users/skrchnavy/events{/privacy}","received_events_url":"https://api.github.com/users/skrchnavy/received_events","type":"User","site_admin":false},"assignees":[{"login":"skrchnavy","id":7057580,"avatar_url":"https://avatars.githubusercontent.com/u/7057580?v=3","gravatar_id":"","url":"https://api.github.com/users/skrchnavy","html_url":"https://github.com/skrchnavy","followers_url":"https://api.github.com/users/skrchnavy/followers","following_url":"https://api.github.com/users/skrchnavy/following{/other_user}","gists_url":"https://api.github.com/users/skrchnavy/gists{/gist_id}","starred_url":"https://api.github.com/users/skrchnavy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skrchnavy/subscriptions","organizations_url":"https://api.github.com/users/skrchnavy/orgs","repos_url":"https://api.github.com/users/skrchnavy/repos","events_url":"https://api.github.com/users/skrchnavy/events{/privacy}","received_events_url":"https://api.github.com/users/skrchnavy/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/opencats/OpenCATS/pulls/91/commits","review_comments_url":"https://api.github.com/repos/opencats/OpenCATS/pulls/91/comments","review_comment_url":"https://api.github.com/repos/opencats/OpenCATS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opencats/OpenCATS/issues/91/comments","statuses_url":"https://api.github.com/repos/opencats/OpenCATS/statuses/0eb574bdc9d7bc71dfa8e2d1c8ca878438e159bf","head":{"label":"AnritsuSolutionsSK:security_improvements_using_secured_objects","ref":"security_improvements_using_secured_objects","sha":"0eb574bdc9d7bc71dfa8e2d1c8ca878438e159bf","user":{"login":"AnritsuSolutionsSK","id":20061890,"avatar_url":"https://avatars.githubusercontent.com/u/20061890?v=3","gravatar_id":"","url":"https://api.github.com/users/AnritsuSolutionsSK","html_url":"https://github.com/AnritsuSolutionsSK","followers_url":"https://api.github.com/users/AnritsuSolutionsSK/followers","following_url":"https://api.github.com/users/AnritsuSolutionsSK/following{/other_user}","gists_url":"https://api.github.com/users/AnritsuSolutionsSK/gists{/gist_id}","starred_url":"https://api.github.com/users/AnritsuSolutionsSK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnritsuSolutionsSK/subscriptions","organizations_url":"https://api.github.com/users/AnritsuSolutionsSK/orgs","repos_url":"https://api.github.com/users/AnritsuSolutionsSK/repos","events_url":"https://api.github.com/users/AnritsuSolutionsSK/events{/privacy}","received_events_url":"https://api.github.com/users/AnritsuSolutionsSK/received_events","type":"Organization","site_admin":false},"repo":{"id":61615232,"name":"OpenCATS","full_name":"AnritsuSolutionsSK/OpenCATS","owner":{"login":"AnritsuSolutionsSK","id":20061890,"avatar_url":"https://avatars.githubusercontent.com/u/20061890?v=3","gravatar_id":"","url":"https://api.github.com/users/AnritsuSolutionsSK","html_url":"https://github.com/AnritsuSolutionsSK","followers_url":"https://api.github.com/users/AnritsuSolutionsSK/followers","following_url":"https://api.github.com/users/AnritsuSolutionsSK/following{/other_user}","gists_url":"https://api.github.com/users/AnritsuSolutionsSK/gists{/gist_id}","starred_url":"https://api.github.com/users/AnritsuSolutionsSK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnritsuSolutionsSK/subscriptions","organizations_url":"https://api.github.com/users/AnritsuSolutionsSK/orgs","repos_url":"https://api.github.com/users/AnritsuSolutionsSK/repos","events_url":"https://api.github.com/users/AnritsuSolutionsSK/events{/privacy}","received_events_url":"https://api.github.com/users/AnritsuSolutionsSK/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AnritsuSolutionsSK/OpenCATS","description":"Fork of OpenCATS repository (https://github.com/opencats/OpenCATS)","fork":true,"url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS","forks_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/forks","keys_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/teams","hooks_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/hooks","issue_events_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/issues/events{/number}","events_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/events","assignees_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/assignees{/user}","branches_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/branches{/branch}","tags_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/tags","blobs_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/git/refs{/sha}","trees_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/statuses/{sha}","languages_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/languages","stargazers_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/stargazers","contributors_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/contributors","subscribers_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/subscribers","subscription_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/subscription","commits_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/commits{/sha}","git_commits_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/git/commits{/sha}","comments_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/comments{/number}","issue_comment_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/issues/comments{/number}","contents_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/contents/{+path}","compare_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/merges","archive_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/downloads","issues_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/issues{/number}","pulls_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/pulls{/number}","milestones_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/milestones{/number}","notifications_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/labels{/name}","releases_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/releases{/id}","deployments_url":"https://api.github.com/repos/AnritsuSolutionsSK/OpenCATS/deployments","created_at":"2016-06-21T08:12:27Z","updated_at":"2016-06-21T08:16:56Z","pushed_at":"2016-07-28T10:08:12Z","git_url":"git://github.com/AnritsuSolutionsSK/OpenCATS.git","ssh_url":"git@github.com:AnritsuSolutionsSK/OpenCATS.git","clone_url":"https://github.com/AnritsuSolutionsSK/OpenCATS.git","svn_url":"https://github.com/AnritsuSolutionsSK/OpenCATS","homepage":"http://www.opencats.org","size":5235,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"opencats:master","ref":"master","sha":"67898125b94dcafcea92896e4fba9cbf2becc2e3","user":{"login":"opencats","id":106173,"avatar_url":"https://avatars.githubusercontent.com/u/106173?v=3","gravatar_id":"","url":"https://api.github.com/users/opencats","html_url":"https://github.com/opencats","followers_url":"https://api.github.com/users/opencats/followers","following_url":"https://api.github.com/users/opencats/following{/other_user}","gists_url":"https://api.github.com/users/opencats/gists{/gist_id}","starred_url":"https://api.github.com/users/opencats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencats/subscriptions","organizations_url":"https://api.github.com/users/opencats/orgs","repos_url":"https://api.github.com/users/opencats/repos","events_url":"https://api.github.com/users/opencats/events{/privacy}","received_events_url":"https://api.github.com/users/opencats/received_events","type":"Organization","site_admin":false},"repo":{"id":254005,"name":"OpenCATS","full_name":"opencats/OpenCATS","owner":{"login":"opencats","id":106173,"avatar_url":"https://avatars.githubusercontent.com/u/106173?v=3","gravatar_id":"","url":"https://api.github.com/users/opencats","html_url":"https://github.com/opencats","followers_url":"https://api.github.com/users/opencats/followers","following_url":"https://api.github.com/users/opencats/following{/other_user}","gists_url":"https://api.github.com/users/opencats/gists{/gist_id}","starred_url":"https://api.github.com/users/opencats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencats/subscriptions","organizations_url":"https://api.github.com/users/opencats/orgs","repos_url":"https://api.github.com/users/opencats/repos","events_url":"https://api.github.com/users/opencats/events{/privacy}","received_events_url":"https://api.github.com/users/opencats/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opencats/OpenCATS","description":"Actively Developed and Maintained Code Base","fork":false,"url":"https://api.github.com/repos/opencats/OpenCATS","forks_url":"https://api.github.com/repos/opencats/OpenCATS/forks","keys_url":"https://api.github.com/repos/opencats/OpenCATS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opencats/OpenCATS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opencats/OpenCATS/teams","hooks_url":"https://api.github.com/repos/opencats/OpenCATS/hooks","issue_events_url":"https://api.github.com/repos/opencats/OpenCATS/issues/events{/number}","events_url":"https://api.github.com/repos/opencats/OpenCATS/events","assignees_url":"https://api.github.com/repos/opencats/OpenCATS/assignees{/user}","branches_url":"https://api.github.com/repos/opencats/OpenCATS/branches{/branch}","tags_url":"https://api.github.com/repos/opencats/OpenCATS/tags","blobs_url":"https://api.github.com/repos/opencats/OpenCATS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opencats/OpenCATS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opencats/OpenCATS/git/refs{/sha}","trees_url":"https://api.github.com/repos/opencats/OpenCATS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opencats/OpenCATS/statuses/{sha}","languages_url":"https://api.github.com/repos/opencats/OpenCATS/languages","stargazers_url":"https://api.github.com/repos/opencats/OpenCATS/stargazers","contributors_url":"https://api.github.com/repos/opencats/OpenCATS/contributors","subscribers_url":"https://api.github.com/repos/opencats/OpenCATS/subscribers","subscription_url":"https://api.github.com/repos/opencats/OpenCATS/subscription","commits_url":"https://api.github.com/repos/opencats/OpenCATS/commits{/sha}","git_commits_url":"https://api.github.com/repos/opencats/OpenCATS/git/commits{/sha}","comments_url":"https://api.github.com/repos/opencats/OpenCATS/comments{/number}","issue_comment_url":"https://api.github.com/repos/opencats/OpenCATS/issues/comments{/number}","contents_url":"https://api.github.com/repos/opencats/OpenCATS/contents/{+path}","compare_url":"https://api.github.com/repos/opencats/OpenCATS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opencats/OpenCATS/merges","archive_url":"https://api.github.com/repos/opencats/OpenCATS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opencats/OpenCATS/downloads","issues_url":"https://api.github.com/repos/opencats/OpenCATS/issues{/number}","pulls_url":"https://api.github.com/repos/opencats/OpenCATS/pulls{/number}","milestones_url":"https://api.github.com/repos/opencats/OpenCATS/milestones{/number}","notifications_url":"https://api.github.com/repos/opencats/OpenCATS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opencats/OpenCATS/labels{/name}","releases_url":"https://api.github.com/repos/opencats/OpenCATS/releases{/id}","deployments_url":"https://api.github.com/repos/opencats/OpenCATS/deployments","created_at":"2009-07-17T23:04:39Z","updated_at":"2016-07-22T21:51:14Z","pushed_at":"2016-07-28T10:08:13Z","git_url":"git://github.com/opencats/OpenCATS.git","ssh_url":"git@github.com:opencats/OpenCATS.git","clone_url":"https://github.com/opencats/OpenCATS.git","svn_url":"https://github.com/opencats/OpenCATS","homepage":"http://www.opencats.org","size":22348,"stargazers_count":39,"watchers_count":39,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":38,"forks":42,"open_issues":38,"watchers":39,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opencats/OpenCATS/pulls/91"},"html":{"href":"https://github.com/opencats/OpenCATS/pull/91"},"issue":{"href":"https://api.github.com/repos/opencats/OpenCATS/issues/91"},"comments":{"href":"https://api.github.com/repos/opencats/OpenCATS/issues/91/comments"},"review_comments":{"href":"https://api.github.com/repos/opencats/OpenCATS/pulls/91/comments"},"review_comment":{"href":"https://api.github.com/repos/opencats/OpenCATS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opencats/OpenCATS/pulls/91/commits"},"statuses":{"href":"https://api.github.com/repos/opencats/OpenCATS/statuses/0eb574bdc9d7bc71dfa8e2d1c8ca878438e159bf"}}}}
{"actor":{"display_login":"skrchnavy"}}