{"action":"created","comment":{"url":"https://api.github.com/repos/kabisa/kudo-o-matic/pulls/comments/218740521","pull_request_review_id":156741620,"id":218740521,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODc0MDUyMQ==","diff_hunk":"@@ -1,12 +1,20 @@\n # frozen_string_literal: true\n \n class BalancesController < ApplicationController\n+  before_action :require_authorization\n+\n+  def require_authorization\n+    redirect_to dashboard_path(team: current_team) unless current_user.admin_of?(current_team)\n+  end\n+\n   def index\n     @balances = current_team.balances.order('created_at DESC')\n+    @current_balance = @balances.where(current: true)","path":"app/controllers/balances_controller.rb","position":12,"original_position":12,"commit_id":"8ddb14d396ac160f6e396eaa387d8cf7771c9e39","original_commit_id":"8ddb14d396ac160f6e396eaa387d8cf7771c9e39","user":{"login":"egonm12","id":20042349,"node_id":"MDQ6VXNlcjIwMDQyMzQ5","avatar_url":"https://avatars0.githubusercontent.com/u/20042349?v=4","gravatar_id":"","url":"https://api.github.com/users/egonm12","html_url":"https://github.com/egonm12","followers_url":"https://api.github.com/users/egonm12/followers","following_url":"https://api.github.com/users/egonm12/following{/other_user}","gists_url":"https://api.github.com/users/egonm12/gists{/gist_id}","starred_url":"https://api.github.com/users/egonm12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egonm12/subscriptions","organizations_url":"https://api.github.com/users/egonm12/orgs","repos_url":"https://api.github.com/users/egonm12/repos","events_url":"https://api.github.com/users/egonm12/events{/privacy}","received_events_url":"https://api.github.com/users/egonm12/received_events","type":"User","site_admin":false},"body":"@ariejan Because there can only be one current balance in a team.","created_at":"2018-09-19T09:53:56Z","updated_at":"2018-09-19T09:53:56Z","html_url":"https://github.com/kabisa/kudo-o-matic/pull/418#discussion_r218740521","pull_request_url":"https://api.github.com/repos/kabisa/kudo-o-matic/pulls/418","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/kabisa/kudo-o-matic/pulls/comments/218740521"},"html":{"href":"https://github.com/kabisa/kudo-o-matic/pull/418#discussion_r218740521"},"pull_request":{"href":"https://api.github.com/repos/kabisa/kudo-o-matic/pulls/418"}},"in_reply_to_id":218714969},"pull_request":{"url":"https://api.github.com/repos/kabisa/kudo-o-matic/pulls/418","id":216293739,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE2MjkzNzM5","html_url":"https://github.com/kabisa/kudo-o-matic/pull/418","diff_url":"https://github.com/kabisa/kudo-o-matic/pull/418.diff","patch_url":"https://github.com/kabisa/kudo-o-matic/pull/418.patch","issue_url":"https://api.github.com/repos/kabisa/kudo-o-matic/issues/418","number":418,"state":"open","locked":false,"title":"Feature profile menu and team manage","user":{"login":"egonm12","id":20042349,"node_id":"MDQ6VXNlcjIwMDQyMzQ5","avatar_url":"https://avatars0.githubusercontent.com/u/20042349?v=4","gravatar_id":"","url":"https://api.github.com/users/egonm12","html_url":"https://github.com/egonm12","followers_url":"https://api.github.com/users/egonm12/followers","following_url":"https://api.github.com/users/egonm12/following{/other_user}","gists_url":"https://api.github.com/users/egonm12/gists{/gist_id}","starred_url":"https://api.github.com/users/egonm12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egonm12/subscriptions","organizations_url":"https://api.github.com/users/egonm12/orgs","repos_url":"https://api.github.com/users/egonm12/repos","events_url":"https://api.github.com/users/egonm12/events{/privacy}","received_events_url":"https://api.github.com/users/egonm12/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-09-18T12:43:00Z","updated_at":"2018-09-19T09:53:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a087205df1a3129818b030b7872bd30b3565f486","assignee":{"login":"egonm12","id":20042349,"node_id":"MDQ6VXNlcjIwMDQyMzQ5","avatar_url":"https://avatars0.githubusercontent.com/u/20042349?v=4","gravatar_id":"","url":"https://api.github.com/users/egonm12","html_url":"https://github.com/egonm12","followers_url":"https://api.github.com/users/egonm12/followers","following_url":"https://api.github.com/users/egonm12/following{/other_user}","gists_url":"https://api.github.com/users/egonm12/gists{/gist_id}","starred_url":"https://api.github.com/users/egonm12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egonm12/subscriptions","organizations_url":"https://api.github.com/users/egonm12/orgs","repos_url":"https://api.github.com/users/egonm12/repos","events_url":"https://api.github.com/users/egonm12/events{/privacy}","received_events_url":"https://api.github.com/users/egonm12/received_events","type":"User","site_admin":false},"assignees":[{"login":"egonm12","id":20042349,"node_id":"MDQ6VXNlcjIwMDQyMzQ5","avatar_url":"https://avatars0.githubusercontent.com/u/20042349?v=4","gravatar_id":"","url":"https://api.github.com/users/egonm12","html_url":"https://github.com/egonm12","followers_url":"https://api.github.com/users/egonm12/followers","following_url":"https://api.github.com/users/egonm12/following{/other_user}","gists_url":"https://api.github.com/users/egonm12/gists{/gist_id}","starred_url":"https://api.github.com/users/egonm12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egonm12/subscriptions","organizations_url":"https://api.github.com/users/egonm12/orgs","repos_url":"https://api.github.com/users/egonm12/repos","events_url":"https://api.github.com/users/egonm12/events{/privacy}","received_events_url":"https://api.github.com/users/egonm12/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/kabisa/kudo-o-matic/pulls/418/commits","review_comments_url":"https://api.github.com/repos/kabisa/kudo-o-matic/pulls/418/comments","review_comment_url":"https://api.github.com/repos/kabisa/kudo-o-matic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kabisa/kudo-o-matic/issues/418/comments","statuses_url":"https://api.github.com/repos/kabisa/kudo-o-matic/statuses/8ddb14d396ac160f6e396eaa387d8cf7771c9e39","head":{"label":"kabisa:feature_user_friendly_profile","ref":"feature_user_friendly_profile","sha":"8ddb14d396ac160f6e396eaa387d8cf7771c9e39","user":{"login":"kabisa","id":1531725,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MzE3MjU=","avatar_url":"https://avatars1.githubusercontent.com/u/1531725?v=4","gravatar_id":"","url":"https://api.github.com/users/kabisa","html_url":"https://github.com/kabisa","followers_url":"https://api.github.com/users/kabisa/followers","following_url":"https://api.github.com/users/kabisa/following{/other_user}","gists_url":"https://api.github.com/users/kabisa/gists{/gist_id}","starred_url":"https://api.github.com/users/kabisa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kabisa/subscriptions","organizations_url":"https://api.github.com/users/kabisa/orgs","repos_url":"https://api.github.com/users/kabisa/repos","events_url":"https://api.github.com/users/kabisa/events{/privacy}","received_events_url":"https://api.github.com/users/kabisa/received_events","type":"Organization","site_admin":false},"repo":{"id":54659354,"node_id":"MDEwOlJlcG9zaXRvcnk1NDY1OTM1NA==","name":"kudo-o-matic","full_name":"kabisa/kudo-o-matic","private":false,"owner":{"login":"kabisa","id":1531725,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MzE3MjU=","avatar_url":"https://avatars1.githubusercontent.com/u/1531725?v=4","gravatar_id":"","url":"https://api.github.com/users/kabisa","html_url":"https://github.com/kabisa","followers_url":"https://api.github.com/users/kabisa/followers","following_url":"https://api.github.com/users/kabisa/following{/other_user}","gists_url":"https://api.github.com/users/kabisa/gists{/gist_id}","starred_url":"https://api.github.com/users/kabisa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kabisa/subscriptions","organizations_url":"https://api.github.com/users/kabisa/orgs","repos_url":"https://api.github.com/users/kabisa/repos","events_url":"https://api.github.com/users/kabisa/events{/privacy}","received_events_url":"https://api.github.com/users/kabisa/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/kabisa/kudo-o-matic","description":"Kudo-o-Matic™","fork":false,"url":"https://api.github.com/repos/kabisa/kudo-o-matic","forks_url":"https://api.github.com/repos/kabisa/kudo-o-matic/forks","keys_url":"https://api.github.com/repos/kabisa/kudo-o-matic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kabisa/kudo-o-matic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kabisa/kudo-o-matic/teams","hooks_url":"https://api.github.com/repos/kabisa/kudo-o-matic/hooks","issue_events_url":"https://api.github.com/repos/kabisa/kudo-o-matic/issues/events{/number}","events_url":"https://api.github.com/repos/kabisa/kudo-o-matic/events","assignees_url":"https://api.github.com/repos/kabisa/kudo-o-matic/assignees{/user}","branches_url":"https://api.github.com/repos/kabisa/kudo-o-matic/branches{/branch}","tags_url":"https://api.github.com/repos/kabisa/kudo-o-matic/tags","blobs_url":"https://api.github.com/repos/kabisa/kudo-o-matic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kabisa/kudo-o-matic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kabisa/kudo-o-matic/git/refs{/sha}","trees_url":"https://api.github.com/repos/kabisa/kudo-o-matic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kabisa/kudo-o-matic/statuses/{sha}","languages_url":"https://api.github.com/repos/kabisa/kudo-o-matic/languages","stargazers_url":"https://api.github.com/repos/kabisa/kudo-o-matic/stargazers","contributors_url":"https://api.github.com/repos/kabisa/kudo-o-matic/contributors","subscribers_url":"https://api.github.com/repos/kabisa/kudo-o-matic/subscribers","subscription_url":"https://api.github.com/repos/kabisa/kudo-o-matic/subscription","commits_url":"https://api.github.com/repos/kabisa/kudo-o-matic/commits{/sha}","git_commits_url":"https://api.github.com/repos/kabisa/kudo-o-matic/git/commits{/sha}","comments_url":"https://api.github.com/repos/kabisa/kudo-o-matic/comments{/number}","issue_comment_url":"https://api.github.com/repos/kabisa/kudo-o-matic/issues/comments{/number}","contents_url":"https://api.github.com/repos/kabisa/kudo-o-matic/contents/{+path}","compare_url":"https://api.github.com/repos/kabisa/kudo-o-matic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kabisa/kudo-o-matic/merges","archive_url":"https://api.github.com/repos/kabisa/kudo-o-matic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kabisa/kudo-o-matic/downloads","issues_url":"https://api.github.com/repos/kabisa/kudo-o-matic/issues{/number}","pulls_url":"https://api.github.com/repos/kabisa/kudo-o-matic/pulls{/number}","milestones_url":"https://api.github.com/repos/kabisa/kudo-o-matic/milestones{/number}","notifications_url":"https://api.github.com/repos/kabisa/kudo-o-matic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kabisa/kudo-o-matic/labels{/name}","releases_url":"https://api.github.com/repos/kabisa/kudo-o-matic/releases{/id}","deployments_url":"https://api.github.com/repos/kabisa/kudo-o-matic/deployments","created_at":"2016-03-24T17:02:48Z","updated_at":"2018-09-14T13:45:40Z","pushed_at":"2018-09-18T13:14:22Z","git_url":"git://github.com/kabisa/kudo-o-matic.git","ssh_url":"git@github.com:kabisa/kudo-o-matic.git","clone_url":"https://github.com/kabisa/kudo-o-matic.git","svn_url":"https://github.com/kabisa/kudo-o-matic","homepage":null,"size":29699,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":5,"watchers":5,"default_branch":"develop"}},"base":{"label":"kabisa:develop","ref":"develop","sha":"def155149c1cc48bb9f8fcbf5b7eca25daa6af17","user":{"login":"kabisa","id":1531725,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MzE3MjU=","avatar_url":"https://avatars1.githubusercontent.com/u/1531725?v=4","gravatar_id":"","url":"https://api.github.com/users/kabisa","html_url":"https://github.com/kabisa","followers_url":"https://api.github.com/users/kabisa/followers","following_url":"https://api.github.com/users/kabisa/following{/other_user}","gists_url":"https://api.github.com/users/kabisa/gists{/gist_id}","starred_url":"https://api.github.com/users/kabisa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kabisa/subscriptions","organizations_url":"https://api.github.com/users/kabisa/orgs","repos_url":"https://api.github.com/users/kabisa/repos","events_url":"https://api.github.com/users/kabisa/events{/privacy}","received_events_url":"https://api.github.com/users/kabisa/received_events","type":"Organization","site_admin":false},"repo":{"id":54659354,"node_id":"MDEwOlJlcG9zaXRvcnk1NDY1OTM1NA==","name":"kudo-o-matic","full_name":"kabisa/kudo-o-matic","private":false,"owner":{"login":"kabisa","id":1531725,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MzE3MjU=","avatar_url":"https://avatars1.githubusercontent.com/u/1531725?v=4","gravatar_id":"","url":"https://api.github.com/users/kabisa","html_url":"https://github.com/kabisa","followers_url":"https://api.github.com/users/kabisa/followers","following_url":"https://api.github.com/users/kabisa/following{/other_user}","gists_url":"https://api.github.com/users/kabisa/gists{/gist_id}","starred_url":"https://api.github.com/users/kabisa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kabisa/subscriptions","organizations_url":"https://api.github.com/users/kabisa/orgs","repos_url":"https://api.github.com/users/kabisa/repos","events_url":"https://api.github.com/users/kabisa/events{/privacy}","received_events_url":"https://api.github.com/users/kabisa/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/kabisa/kudo-o-matic","description":"Kudo-o-Matic™","fork":false,"url":"https://api.github.com/repos/kabisa/kudo-o-matic","forks_url":"https://api.github.com/repos/kabisa/kudo-o-matic/forks","keys_url":"https://api.github.com/repos/kabisa/kudo-o-matic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kabisa/kudo-o-matic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kabisa/kudo-o-matic/teams","hooks_url":"https://api.github.com/repos/kabisa/kudo-o-matic/hooks","issue_events_url":"https://api.github.com/repos/kabisa/kudo-o-matic/issues/events{/number}","events_url":"https://api.github.com/repos/kabisa/kudo-o-matic/events","assignees_url":"https://api.github.com/repos/kabisa/kudo-o-matic/assignees{/user}","branches_url":"https://api.github.com/repos/kabisa/kudo-o-matic/branches{/branch}","tags_url":"https://api.github.com/repos/kabisa/kudo-o-matic/tags","blobs_url":"https://api.github.com/repos/kabisa/kudo-o-matic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kabisa/kudo-o-matic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kabisa/kudo-o-matic/git/refs{/sha}","trees_url":"https://api.github.com/repos/kabisa/kudo-o-matic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kabisa/kudo-o-matic/statuses/{sha}","languages_url":"https://api.github.com/repos/kabisa/kudo-o-matic/languages","stargazers_url":"https://api.github.com/repos/kabisa/kudo-o-matic/stargazers","contributors_url":"https://api.github.com/repos/kabisa/kudo-o-matic/contributors","subscribers_url":"https://api.github.com/repos/kabisa/kudo-o-matic/subscribers","subscription_url":"https://api.github.com/repos/kabisa/kudo-o-matic/subscription","commits_url":"https://api.github.com/repos/kabisa/kudo-o-matic/commits{/sha}","git_commits_url":"https://api.github.com/repos/kabisa/kudo-o-matic/git/commits{/sha}","comments_url":"https://api.github.com/repos/kabisa/kudo-o-matic/comments{/number}","issue_comment_url":"https://api.github.com/repos/kabisa/kudo-o-matic/issues/comments{/number}","contents_url":"https://api.github.com/repos/kabisa/kudo-o-matic/contents/{+path}","compare_url":"https://api.github.com/repos/kabisa/kudo-o-matic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kabisa/kudo-o-matic/merges","archive_url":"https://api.github.com/repos/kabisa/kudo-o-matic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kabisa/kudo-o-matic/downloads","issues_url":"https://api.github.com/repos/kabisa/kudo-o-matic/issues{/number}","pulls_url":"https://api.github.com/repos/kabisa/kudo-o-matic/pulls{/number}","milestones_url":"https://api.github.com/repos/kabisa/kudo-o-matic/milestones{/number}","notifications_url":"https://api.github.com/repos/kabisa/kudo-o-matic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kabisa/kudo-o-matic/labels{/name}","releases_url":"https://api.github.com/repos/kabisa/kudo-o-matic/releases{/id}","deployments_url":"https://api.github.com/repos/kabisa/kudo-o-matic/deployments","created_at":"2016-03-24T17:02:48Z","updated_at":"2018-09-14T13:45:40Z","pushed_at":"2018-09-18T13:14:22Z","git_url":"git://github.com/kabisa/kudo-o-matic.git","ssh_url":"git@github.com:kabisa/kudo-o-matic.git","clone_url":"https://github.com/kabisa/kudo-o-matic.git","svn_url":"https://github.com/kabisa/kudo-o-matic","homepage":null,"size":29699,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":5,"watchers":5,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/kabisa/kudo-o-matic/pulls/418"},"html":{"href":"https://github.com/kabisa/kudo-o-matic/pull/418"},"issue":{"href":"https://api.github.com/repos/kabisa/kudo-o-matic/issues/418"},"comments":{"href":"https://api.github.com/repos/kabisa/kudo-o-matic/issues/418/comments"},"review_comments":{"href":"https://api.github.com/repos/kabisa/kudo-o-matic/pulls/418/comments"},"review_comment":{"href":"https://api.github.com/repos/kabisa/kudo-o-matic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kabisa/kudo-o-matic/pulls/418/commits"},"statuses":{"href":"https://api.github.com/repos/kabisa/kudo-o-matic/statuses/8ddb14d396ac160f6e396eaa387d8cf7771c9e39"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"egonm12"}}