{"action":"created","comment":{"url":"https://api.github.com/repos/R4stl1n/allianceauth/pulls/comments/50358247","id":50358247,"diff_hunk":"@@ -0,0 +1,82 @@\n+\n+\n+from django.http import HttpResponseRedirect\n+from django.template import RequestContext\n+from django.shortcuts import render_to_response\n+from django.contrib.auth.decorators import login_required\n+from django.contrib.auth.decorators import permission_required\n+from django.contrib.auth.decorators import user_passes_test\n+from django.utils import timezone\n+\n+from util import check_if_user_has_permission\n+from authentication.managers import AuthServicesInfoManager\n+from eveonline.managers import EveManager\n+from form import opForm\n+from models import optimer\n+\n+import logging\n+\n+logger = logging.getLogger(__name__)\n+\n+def optimer_util_test(user):\n+    return check_if_user_has_permission(user, 'member') or check_if_user_has_permission(user, 'blue_member')\n+\n+\n+@login_required\n+@user_passes_test(optimer_util_test)\n+@permission_required('auth.optimer_view')\n+def optimer_view(request):\n+    logger.info(\"optimer_view called by user %s\" % request.user)\n+    optimer_list = optimer.objects.all()\n+    render_items = {'optimer': optimer.objects.all(),}\n+\n+    return render_to_response('registered/operationmanagement.html', render_items, context_instance=RequestContext(request))\n+\n+\n+@login_required\n+@permission_required('auth.optimer_management')\n+def add_optimer_view(request):\n+    logger.info(\"add_optimer_view called by user %s\" % request.user)\n+    if request.method == 'POST':\n+        form = opForm(request.POST)\n+\tlogger.info(\"Request type POST contains form valid: %s\" % form.is_valid())","path":"optimer/views.py","position":42,"original_position":42,"commit_id":"83c83f8b1be6aab11b61e7acd3c87fc3d1ba9df7","original_commit_id":"83c83f8b1be6aab11b61e7acd3c87fc3d1ba9df7","user":{"login":"orbitroom","id":9189836,"avatar_url":"https://avatars.githubusercontent.com/u/9189836?v=3","gravatar_id":"","url":"https://api.github.com/users/orbitroom","html_url":"https://github.com/orbitroom","followers_url":"https://api.github.com/users/orbitroom/followers","following_url":"https://api.github.com/users/orbitroom/following{/other_user}","gists_url":"https://api.github.com/users/orbitroom/gists{/gist_id}","starred_url":"https://api.github.com/users/orbitroom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orbitroom/subscriptions","organizations_url":"https://api.github.com/users/orbitroom/orgs","repos_url":"https://api.github.com/users/orbitroom/repos","events_url":"https://api.github.com/users/orbitroom/events{/privacy}","received_events_url":"https://api.github.com/users/orbitroom/received_events","type":"User","site_admin":false},"body":"lol i checked it 3 times and still missed it ","created_at":"2016-01-21T04:05:26Z","updated_at":"2016-01-21T04:05:26Z","html_url":"https://github.com/R4stl1n/allianceauth/pull/203#discussion_r50358247","pull_request_url":"https://api.github.com/repos/R4stl1n/allianceauth/pulls/203","_links":{"self":{"href":"https://api.github.com/repos/R4stl1n/allianceauth/pulls/comments/50358247"},"html":{"href":"https://github.com/R4stl1n/allianceauth/pull/203#discussion_r50358247"},"pull_request":{"href":"https://api.github.com/repos/R4stl1n/allianceauth/pulls/203"}}},"pull_request":{"url":"https://api.github.com/repos/R4stl1n/allianceauth/pulls/203","id":56702580,"html_url":"https://github.com/R4stl1n/allianceauth/pull/203","diff_url":"https://github.com/R4stl1n/allianceauth/pull/203.diff","patch_url":"https://github.com/R4stl1n/allianceauth/pull/203.patch","issue_url":"https://api.github.com/repos/R4stl1n/allianceauth/issues/203","number":203,"state":"open","locked":false,"title":"Added Fleet Operation Timer","user":{"login":"orbitroom","id":9189836,"avatar_url":"https://avatars.githubusercontent.com/u/9189836?v=3","gravatar_id":"","url":"https://api.github.com/users/orbitroom","html_url":"https://github.com/orbitroom","followers_url":"https://api.github.com/users/orbitroom/followers","following_url":"https://api.github.com/users/orbitroom/following{/other_user}","gists_url":"https://api.github.com/users/orbitroom/gists{/gist_id}","starred_url":"https://api.github.com/users/orbitroom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orbitroom/subscriptions","organizations_url":"https://api.github.com/users/orbitroom/orgs","repos_url":"https://api.github.com/users/orbitroom/repos","events_url":"https://api.github.com/users/orbitroom/events{/privacy}","received_events_url":"https://api.github.com/users/orbitroom/received_events","type":"User","site_admin":false},"body":"you must run bootstrap_permissions in order for permissions to work\r\npython manage.py shell\r\nfrom util import bootstrap_permissions\r\nbootstrap_permissions()","created_at":"2016-01-21T03:59:49Z","updated_at":"2016-01-21T04:05:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a5bb10e99db030293fe71b2e66c638e1993d4b5a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/R4stl1n/allianceauth/pulls/203/commits","review_comments_url":"https://api.github.com/repos/R4stl1n/allianceauth/pulls/203/comments","review_comment_url":"https://api.github.com/repos/R4stl1n/allianceauth/pulls/comments{/number}","comments_url":"https://api.github.com/repos/R4stl1n/allianceauth/issues/203/comments","statuses_url":"https://api.github.com/repos/R4stl1n/allianceauth/statuses/83c83f8b1be6aab11b61e7acd3c87fc3d1ba9df7","head":{"label":"orbitroom:master","ref":"master","sha":"83c83f8b1be6aab11b61e7acd3c87fc3d1ba9df7","user":{"login":"orbitroom","id":9189836,"avatar_url":"https://avatars.githubusercontent.com/u/9189836?v=3","gravatar_id":"","url":"https://api.github.com/users/orbitroom","html_url":"https://github.com/orbitroom","followers_url":"https://api.github.com/users/orbitroom/followers","following_url":"https://api.github.com/users/orbitroom/following{/other_user}","gists_url":"https://api.github.com/users/orbitroom/gists{/gist_id}","starred_url":"https://api.github.com/users/orbitroom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orbitroom/subscriptions","organizations_url":"https://api.github.com/users/orbitroom/orgs","repos_url":"https://api.github.com/users/orbitroom/repos","events_url":"https://api.github.com/users/orbitroom/events{/privacy}","received_events_url":"https://api.github.com/users/orbitroom/received_events","type":"User","site_admin":false},"repo":{"id":29369614,"name":"allianceauth","full_name":"orbitroom/allianceauth","owner":{"login":"orbitroom","id":9189836,"avatar_url":"https://avatars.githubusercontent.com/u/9189836?v=3","gravatar_id":"","url":"https://api.github.com/users/orbitroom","html_url":"https://github.com/orbitroom","followers_url":"https://api.github.com/users/orbitroom/followers","following_url":"https://api.github.com/users/orbitroom/following{/other_user}","gists_url":"https://api.github.com/users/orbitroom/gists{/gist_id}","starred_url":"https://api.github.com/users/orbitroom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orbitroom/subscriptions","organizations_url":"https://api.github.com/users/orbitroom/orgs","repos_url":"https://api.github.com/users/orbitroom/repos","events_url":"https://api.github.com/users/orbitroom/events{/privacy}","received_events_url":"https://api.github.com/users/orbitroom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/orbitroom/allianceauth","description":"Eve Alliance Auth for the Skeleton Crew.","fork":true,"url":"https://api.github.com/repos/orbitroom/allianceauth","forks_url":"https://api.github.com/repos/orbitroom/allianceauth/forks","keys_url":"https://api.github.com/repos/orbitroom/allianceauth/keys{/key_id}","collaborators_url":"https://api.github.com/repos/orbitroom/allianceauth/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/orbitroom/allianceauth/teams","hooks_url":"https://api.github.com/repos/orbitroom/allianceauth/hooks","issue_events_url":"https://api.github.com/repos/orbitroom/allianceauth/issues/events{/number}","events_url":"https://api.github.com/repos/orbitroom/allianceauth/events","assignees_url":"https://api.github.com/repos/orbitroom/allianceauth/assignees{/user}","branches_url":"https://api.github.com/repos/orbitroom/allianceauth/branches{/branch}","tags_url":"https://api.github.com/repos/orbitroom/allianceauth/tags","blobs_url":"https://api.github.com/repos/orbitroom/allianceauth/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/orbitroom/allianceauth/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/orbitroom/allianceauth/git/refs{/sha}","trees_url":"https://api.github.com/repos/orbitroom/allianceauth/git/trees{/sha}","statuses_url":"https://api.github.com/repos/orbitroom/allianceauth/statuses/{sha}","languages_url":"https://api.github.com/repos/orbitroom/allianceauth/languages","stargazers_url":"https://api.github.com/repos/orbitroom/allianceauth/stargazers","contributors_url":"https://api.github.com/repos/orbitroom/allianceauth/contributors","subscribers_url":"https://api.github.com/repos/orbitroom/allianceauth/subscribers","subscription_url":"https://api.github.com/repos/orbitroom/allianceauth/subscription","commits_url":"https://api.github.com/repos/orbitroom/allianceauth/commits{/sha}","git_commits_url":"https://api.github.com/repos/orbitroom/allianceauth/git/commits{/sha}","comments_url":"https://api.github.com/repos/orbitroom/allianceauth/comments{/number}","issue_comment_url":"https://api.github.com/repos/orbitroom/allianceauth/issues/comments{/number}","contents_url":"https://api.github.com/repos/orbitroom/allianceauth/contents/{+path}","compare_url":"https://api.github.com/repos/orbitroom/allianceauth/compare/{base}...{head}","merges_url":"https://api.github.com/repos/orbitroom/allianceauth/merges","archive_url":"https://api.github.com/repos/orbitroom/allianceauth/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/orbitroom/allianceauth/downloads","issues_url":"https://api.github.com/repos/orbitroom/allianceauth/issues{/number}","pulls_url":"https://api.github.com/repos/orbitroom/allianceauth/pulls{/number}","milestones_url":"https://api.github.com/repos/orbitroom/allianceauth/milestones{/number}","notifications_url":"https://api.github.com/repos/orbitroom/allianceauth/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/orbitroom/allianceauth/labels{/name}","releases_url":"https://api.github.com/repos/orbitroom/allianceauth/releases{/id}","created_at":"2015-01-16T21:56:31Z","updated_at":"2016-01-15T09:35:53Z","pushed_at":"2016-01-21T03:53:51Z","git_url":"git://github.com/orbitroom/allianceauth.git","ssh_url":"git@github.com:orbitroom/allianceauth.git","clone_url":"https://github.com/orbitroom/allianceauth.git","svn_url":"https://github.com/orbitroom/allianceauth","homepage":"","size":3182,"stargazers_count":0,"watchers_count":0,"language":"Python","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":0,"default_branch":"master"}},"base":{"label":"R4stl1n:master","ref":"master","sha":"49e2a67797c4d380929775bad38da3dd1a3454d0","user":{"login":"R4stl1n","id":8485008,"avatar_url":"https://avatars.githubusercontent.com/u/8485008?v=3","gravatar_id":"","url":"https://api.github.com/users/R4stl1n","html_url":"https://github.com/R4stl1n","followers_url":"https://api.github.com/users/R4stl1n/followers","following_url":"https://api.github.com/users/R4stl1n/following{/other_user}","gists_url":"https://api.github.com/users/R4stl1n/gists{/gist_id}","starred_url":"https://api.github.com/users/R4stl1n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/R4stl1n/subscriptions","organizations_url":"https://api.github.com/users/R4stl1n/orgs","repos_url":"https://api.github.com/users/R4stl1n/repos","events_url":"https://api.github.com/users/R4stl1n/events{/privacy}","received_events_url":"https://api.github.com/users/R4stl1n/received_events","type":"User","site_admin":false},"repo":{"id":24770454,"name":"allianceauth","full_name":"R4stl1n/allianceauth","owner":{"login":"R4stl1n","id":8485008,"avatar_url":"https://avatars.githubusercontent.com/u/8485008?v=3","gravatar_id":"","url":"https://api.github.com/users/R4stl1n","html_url":"https://github.com/R4stl1n","followers_url":"https://api.github.com/users/R4stl1n/followers","following_url":"https://api.github.com/users/R4stl1n/following{/other_user}","gists_url":"https://api.github.com/users/R4stl1n/gists{/gist_id}","starred_url":"https://api.github.com/users/R4stl1n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/R4stl1n/subscriptions","organizations_url":"https://api.github.com/users/R4stl1n/orgs","repos_url":"https://api.github.com/users/R4stl1n/repos","events_url":"https://api.github.com/users/R4stl1n/events{/privacy}","received_events_url":"https://api.github.com/users/R4stl1n/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/R4stl1n/allianceauth","description":"Eve alliance auth for the 99 percent","fork":false,"url":"https://api.github.com/repos/R4stl1n/allianceauth","forks_url":"https://api.github.com/repos/R4stl1n/allianceauth/forks","keys_url":"https://api.github.com/repos/R4stl1n/allianceauth/keys{/key_id}","collaborators_url":"https://api.github.com/repos/R4stl1n/allianceauth/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/R4stl1n/allianceauth/teams","hooks_url":"https://api.github.com/repos/R4stl1n/allianceauth/hooks","issue_events_url":"https://api.github.com/repos/R4stl1n/allianceauth/issues/events{/number}","events_url":"https://api.github.com/repos/R4stl1n/allianceauth/events","assignees_url":"https://api.github.com/repos/R4stl1n/allianceauth/assignees{/user}","branches_url":"https://api.github.com/repos/R4stl1n/allianceauth/branches{/branch}","tags_url":"https://api.github.com/repos/R4stl1n/allianceauth/tags","blobs_url":"https://api.github.com/repos/R4stl1n/allianceauth/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/R4stl1n/allianceauth/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/R4stl1n/allianceauth/git/refs{/sha}","trees_url":"https://api.github.com/repos/R4stl1n/allianceauth/git/trees{/sha}","statuses_url":"https://api.github.com/repos/R4stl1n/allianceauth/statuses/{sha}","languages_url":"https://api.github.com/repos/R4stl1n/allianceauth/languages","stargazers_url":"https://api.github.com/repos/R4stl1n/allianceauth/stargazers","contributors_url":"https://api.github.com/repos/R4stl1n/allianceauth/contributors","subscribers_url":"https://api.github.com/repos/R4stl1n/allianceauth/subscribers","subscription_url":"https://api.github.com/repos/R4stl1n/allianceauth/subscription","commits_url":"https://api.github.com/repos/R4stl1n/allianceauth/commits{/sha}","git_commits_url":"https://api.github.com/repos/R4stl1n/allianceauth/git/commits{/sha}","comments_url":"https://api.github.com/repos/R4stl1n/allianceauth/comments{/number}","issue_comment_url":"https://api.github.com/repos/R4stl1n/allianceauth/issues/comments{/number}","contents_url":"https://api.github.com/repos/R4stl1n/allianceauth/contents/{+path}","compare_url":"https://api.github.com/repos/R4stl1n/allianceauth/compare/{base}...{head}","merges_url":"https://api.github.com/repos/R4stl1n/allianceauth/merges","archive_url":"https://api.github.com/repos/R4stl1n/allianceauth/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/R4stl1n/allianceauth/downloads","issues_url":"https://api.github.com/repos/R4stl1n/allianceauth/issues{/number}","pulls_url":"https://api.github.com/repos/R4stl1n/allianceauth/pulls{/number}","milestones_url":"https://api.github.com/repos/R4stl1n/allianceauth/milestones{/number}","notifications_url":"https://api.github.com/repos/R4stl1n/allianceauth/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/R4stl1n/allianceauth/labels{/name}","releases_url":"https://api.github.com/repos/R4stl1n/allianceauth/releases{/id}","created_at":"2014-10-03T19:12:51Z","updated_at":"2016-01-12T08:30:56Z","pushed_at":"2016-01-21T03:59:49Z","git_url":"git://github.com/R4stl1n/allianceauth.git","ssh_url":"git@github.com:R4stl1n/allianceauth.git","clone_url":"https://github.com/R4stl1n/allianceauth.git","svn_url":"https://github.com/R4stl1n/allianceauth","homepage":null,"size":5583,"stargazers_count":40,"watchers_count":40,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":34,"mirror_url":null,"open_issues_count":31,"forks":34,"open_issues":31,"watchers":40,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/R4stl1n/allianceauth/pulls/203"},"html":{"href":"https://github.com/R4stl1n/allianceauth/pull/203"},"issue":{"href":"https://api.github.com/repos/R4stl1n/allianceauth/issues/203"},"comments":{"href":"https://api.github.com/repos/R4stl1n/allianceauth/issues/203/comments"},"review_comments":{"href":"https://api.github.com/repos/R4stl1n/allianceauth/pulls/203/comments"},"review_comment":{"href":"https://api.github.com/repos/R4stl1n/allianceauth/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/R4stl1n/allianceauth/pulls/203/commits"},"statuses":{"href":"https://api.github.com/repos/R4stl1n/allianceauth/statuses/83c83f8b1be6aab11b61e7acd3c87fc3d1ba9df7"}}}}