{"action":"created","comment":{"url":"https://api.github.com/repos/dhlab-basel/Knora/pulls/comments/56155752","id":56155752,"diff_hunk":"@@ -179,6 +179,21 @@\n \n             SALSAH.ApiPost('session', {username: $('#user_id').val(), password: $('#password').val()}, authorization, function(data) {\n \t\t\t\tif (data.status == ApiErrors.OK) {\n+\t\t\t\t\tconsole.log(\"session created with id \" + data.sid);\n+\t\t\t\t\t$.ajax({\n+\t\t\t\t\t\turl: \"http://localhost:1024/Knora_login\",","path":"salsah/src/public/index.html","position":6,"original_position":6,"commit_id":"d9b21085b3c5d16ac3ee7125d330b0ff781cf1c7","original_commit_id":"d9b21085b3c5d16ac3ee7125d330b0ff781cf1c7","user":{"login":"benjamingeer","id":558389,"avatar_url":"https://avatars.githubusercontent.com/u/558389?v=3","gravatar_id":"","url":"https://api.github.com/users/benjamingeer","html_url":"https://github.com/benjamingeer","followers_url":"https://api.github.com/users/benjamingeer/followers","following_url":"https://api.github.com/users/benjamingeer/following{/other_user}","gists_url":"https://api.github.com/users/benjamingeer/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamingeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamingeer/subscriptions","organizations_url":"https://api.github.com/users/benjamingeer/orgs","repos_url":"https://api.github.com/users/benjamingeer/repos","events_url":"https://api.github.com/users/benjamingeer/events{/privacy}","received_events_url":"https://api.github.com/users/benjamingeer/received_events","type":"User","site_admin":false},"body":"Can we not hard-code the Sipi URL in SALSAH?","created_at":"2016-03-15T12:42:07Z","updated_at":"2016-03-15T12:42:07Z","html_url":"https://github.com/dhlab-basel/Knora/pull/87#discussion_r56155752","pull_request_url":"https://api.github.com/repos/dhlab-basel/Knora/pulls/87","_links":{"self":{"href":"https://api.github.com/repos/dhlab-basel/Knora/pulls/comments/56155752"},"html":{"href":"https://github.com/dhlab-basel/Knora/pull/87#discussion_r56155752"},"pull_request":{"href":"https://api.github.com/repos/dhlab-basel/Knora/pulls/87"}}},"pull_request":{"url":"https://api.github.com/repos/dhlab-basel/Knora/pulls/87","id":62898573,"html_url":"https://github.com/dhlab-basel/Knora/pull/87","diff_url":"https://github.com/dhlab-basel/Knora/pull/87.diff","patch_url":"https://github.com/dhlab-basel/Knora/pull/87.patch","issue_url":"https://api.github.com/repos/dhlab-basel/Knora/issues/87","number":87,"state":"open","locked":false,"title":"Wip/sipi knora communication","user":{"login":"tobiasschweizer","id":6000023,"avatar_url":"https://avatars.githubusercontent.com/u/6000023?v=3","gravatar_id":"","url":"https://api.github.com/users/tobiasschweizer","html_url":"https://github.com/tobiasschweizer","followers_url":"https://api.github.com/users/tobiasschweizer/followers","following_url":"https://api.github.com/users/tobiasschweizer/following{/other_user}","gists_url":"https://api.github.com/users/tobiasschweizer/gists{/gist_id}","starred_url":"https://api.github.com/users/tobiasschweizer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobiasschweizer/subscriptions","organizations_url":"https://api.github.com/users/tobiasschweizer/orgs","repos_url":"https://api.github.com/users/tobiasschweizer/repos","events_url":"https://api.github.com/users/tobiasschweizer/events{/privacy}","received_events_url":"https://api.github.com/users/tobiasschweizer/received_events","type":"User","site_admin":false},"body":"I changed the Sipi responder so it receives a request from Sipi containing the name of the file the permissions shall be returned for. Given the file name, Knora looks for the corresponding file value Iri to return the permissions.\r\n\r\nIn Salsah, I added an extra request that is sent to Sipi when the login to Knora has been made. This will set a second cookie that contains the Knora session id. Like this, Sipi can attach the Knora session id when asking Knora about the user's permission on a file. Without this second cookie, Knora could not find out which user is making request.\r\n\r\nFor security reasons, we should use SSL in the productive version of Knora and make cookies HTTPOnly (so they cannot be read by running JS `document.cookie`).","created_at":"2016-03-15T12:36:17Z","updated_at":"2016-03-15T12:42:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bdffd0362d05b2bcbaf0d9bc3288640a159d0b51","assignee":{"login":"benjamingeer","id":558389,"avatar_url":"https://avatars.githubusercontent.com/u/558389?v=3","gravatar_id":"","url":"https://api.github.com/users/benjamingeer","html_url":"https://github.com/benjamingeer","followers_url":"https://api.github.com/users/benjamingeer/followers","following_url":"https://api.github.com/users/benjamingeer/following{/other_user}","gists_url":"https://api.github.com/users/benjamingeer/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamingeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamingeer/subscriptions","organizations_url":"https://api.github.com/users/benjamingeer/orgs","repos_url":"https://api.github.com/users/benjamingeer/repos","events_url":"https://api.github.com/users/benjamingeer/events{/privacy}","received_events_url":"https://api.github.com/users/benjamingeer/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dhlab-basel/Knora/milestones/1","html_url":"https://github.com/dhlab-basel/Knora/milestones/On%20Deck","labels_url":"https://api.github.com/repos/dhlab-basel/Knora/milestones/1/labels","id":1549435,"number":1,"title":"On Deck","description":null,"creator":{"login":"benjamingeer","id":558389,"avatar_url":"https://avatars.githubusercontent.com/u/558389?v=3","gravatar_id":"","url":"https://api.github.com/users/benjamingeer","html_url":"https://github.com/benjamingeer","followers_url":"https://api.github.com/users/benjamingeer/followers","following_url":"https://api.github.com/users/benjamingeer/following{/other_user}","gists_url":"https://api.github.com/users/benjamingeer/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamingeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamingeer/subscriptions","organizations_url":"https://api.github.com/users/benjamingeer/orgs","repos_url":"https://api.github.com/users/benjamingeer/repos","events_url":"https://api.github.com/users/benjamingeer/events{/privacy}","received_events_url":"https://api.github.com/users/benjamingeer/received_events","type":"User","site_admin":false},"open_issues":34,"closed_issues":37,"state":"open","created_at":"2016-01-28T16:58:42Z","updated_at":"2016-03-15T12:36:33Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/dhlab-basel/Knora/pulls/87/commits","review_comments_url":"https://api.github.com/repos/dhlab-basel/Knora/pulls/87/comments","review_comment_url":"https://api.github.com/repos/dhlab-basel/Knora/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dhlab-basel/Knora/issues/87/comments","statuses_url":"https://api.github.com/repos/dhlab-basel/Knora/statuses/d9b21085b3c5d16ac3ee7125d330b0ff781cf1c7","head":{"label":"dhlab-basel:wip/sipi_Knora_communication","ref":"wip/sipi_Knora_communication","sha":"d9b21085b3c5d16ac3ee7125d330b0ff781cf1c7","user":{"login":"dhlab-basel","id":16879914,"avatar_url":"https://avatars.githubusercontent.com/u/16879914?v=3","gravatar_id":"","url":"https://api.github.com/users/dhlab-basel","html_url":"https://github.com/dhlab-basel","followers_url":"https://api.github.com/users/dhlab-basel/followers","following_url":"https://api.github.com/users/dhlab-basel/following{/other_user}","gists_url":"https://api.github.com/users/dhlab-basel/gists{/gist_id}","starred_url":"https://api.github.com/users/dhlab-basel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhlab-basel/subscriptions","organizations_url":"https://api.github.com/users/dhlab-basel/orgs","repos_url":"https://api.github.com/users/dhlab-basel/repos","events_url":"https://api.github.com/users/dhlab-basel/events{/privacy}","received_events_url":"https://api.github.com/users/dhlab-basel/received_events","type":"Organization","site_admin":false},"repo":{"id":47264649,"name":"Knora","full_name":"dhlab-basel/Knora","owner":{"login":"dhlab-basel","id":16879914,"avatar_url":"https://avatars.githubusercontent.com/u/16879914?v=3","gravatar_id":"","url":"https://api.github.com/users/dhlab-basel","html_url":"https://github.com/dhlab-basel","followers_url":"https://api.github.com/users/dhlab-basel/followers","following_url":"https://api.github.com/users/dhlab-basel/following{/other_user}","gists_url":"https://api.github.com/users/dhlab-basel/gists{/gist_id}","starred_url":"https://api.github.com/users/dhlab-basel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhlab-basel/subscriptions","organizations_url":"https://api.github.com/users/dhlab-basel/orgs","repos_url":"https://api.github.com/users/dhlab-basel/repos","events_url":"https://api.github.com/users/dhlab-basel/events{/privacy}","received_events_url":"https://api.github.com/users/dhlab-basel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dhlab-basel/Knora","description":"Knowledge Organization, Representation, and Annotation","fork":false,"url":"https://api.github.com/repos/dhlab-basel/Knora","forks_url":"https://api.github.com/repos/dhlab-basel/Knora/forks","keys_url":"https://api.github.com/repos/dhlab-basel/Knora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dhlab-basel/Knora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dhlab-basel/Knora/teams","hooks_url":"https://api.github.com/repos/dhlab-basel/Knora/hooks","issue_events_url":"https://api.github.com/repos/dhlab-basel/Knora/issues/events{/number}","events_url":"https://api.github.com/repos/dhlab-basel/Knora/events","assignees_url":"https://api.github.com/repos/dhlab-basel/Knora/assignees{/user}","branches_url":"https://api.github.com/repos/dhlab-basel/Knora/branches{/branch}","tags_url":"https://api.github.com/repos/dhlab-basel/Knora/tags","blobs_url":"https://api.github.com/repos/dhlab-basel/Knora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dhlab-basel/Knora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dhlab-basel/Knora/git/refs{/sha}","trees_url":"https://api.github.com/repos/dhlab-basel/Knora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dhlab-basel/Knora/statuses/{sha}","languages_url":"https://api.github.com/repos/dhlab-basel/Knora/languages","stargazers_url":"https://api.github.com/repos/dhlab-basel/Knora/stargazers","contributors_url":"https://api.github.com/repos/dhlab-basel/Knora/contributors","subscribers_url":"https://api.github.com/repos/dhlab-basel/Knora/subscribers","subscription_url":"https://api.github.com/repos/dhlab-basel/Knora/subscription","commits_url":"https://api.github.com/repos/dhlab-basel/Knora/commits{/sha}","git_commits_url":"https://api.github.com/repos/dhlab-basel/Knora/git/commits{/sha}","comments_url":"https://api.github.com/repos/dhlab-basel/Knora/comments{/number}","issue_comment_url":"https://api.github.com/repos/dhlab-basel/Knora/issues/comments{/number}","contents_url":"https://api.github.com/repos/dhlab-basel/Knora/contents/{+path}","compare_url":"https://api.github.com/repos/dhlab-basel/Knora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dhlab-basel/Knora/merges","archive_url":"https://api.github.com/repos/dhlab-basel/Knora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dhlab-basel/Knora/downloads","issues_url":"https://api.github.com/repos/dhlab-basel/Knora/issues{/number}","pulls_url":"https://api.github.com/repos/dhlab-basel/Knora/pulls{/number}","milestones_url":"https://api.github.com/repos/dhlab-basel/Knora/milestones{/number}","notifications_url":"https://api.github.com/repos/dhlab-basel/Knora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dhlab-basel/Knora/labels{/name}","releases_url":"https://api.github.com/repos/dhlab-basel/Knora/releases{/id}","deployments_url":"https://api.github.com/repos/dhlab-basel/Knora/deployments","created_at":"2015-12-02T14:00:26Z","updated_at":"2016-02-03T14:57:21Z","pushed_at":"2016-03-15T12:38:48Z","git_url":"git://github.com/dhlab-basel/Knora.git","ssh_url":"git@github.com:dhlab-basel/Knora.git","clone_url":"https://github.com/dhlab-basel/Knora.git","svn_url":"https://github.com/dhlab-basel/Knora","homepage":null,"size":67184,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":40,"forks":2,"open_issues":40,"watchers":0,"default_branch":"develop"}},"base":{"label":"dhlab-basel:develop","ref":"develop","sha":"20568853cdf4f9da1c307818b9d501518b004f9b","user":{"login":"dhlab-basel","id":16879914,"avatar_url":"https://avatars.githubusercontent.com/u/16879914?v=3","gravatar_id":"","url":"https://api.github.com/users/dhlab-basel","html_url":"https://github.com/dhlab-basel","followers_url":"https://api.github.com/users/dhlab-basel/followers","following_url":"https://api.github.com/users/dhlab-basel/following{/other_user}","gists_url":"https://api.github.com/users/dhlab-basel/gists{/gist_id}","starred_url":"https://api.github.com/users/dhlab-basel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhlab-basel/subscriptions","organizations_url":"https://api.github.com/users/dhlab-basel/orgs","repos_url":"https://api.github.com/users/dhlab-basel/repos","events_url":"https://api.github.com/users/dhlab-basel/events{/privacy}","received_events_url":"https://api.github.com/users/dhlab-basel/received_events","type":"Organization","site_admin":false},"repo":{"id":47264649,"name":"Knora","full_name":"dhlab-basel/Knora","owner":{"login":"dhlab-basel","id":16879914,"avatar_url":"https://avatars.githubusercontent.com/u/16879914?v=3","gravatar_id":"","url":"https://api.github.com/users/dhlab-basel","html_url":"https://github.com/dhlab-basel","followers_url":"https://api.github.com/users/dhlab-basel/followers","following_url":"https://api.github.com/users/dhlab-basel/following{/other_user}","gists_url":"https://api.github.com/users/dhlab-basel/gists{/gist_id}","starred_url":"https://api.github.com/users/dhlab-basel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhlab-basel/subscriptions","organizations_url":"https://api.github.com/users/dhlab-basel/orgs","repos_url":"https://api.github.com/users/dhlab-basel/repos","events_url":"https://api.github.com/users/dhlab-basel/events{/privacy}","received_events_url":"https://api.github.com/users/dhlab-basel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dhlab-basel/Knora","description":"Knowledge Organization, Representation, and Annotation","fork":false,"url":"https://api.github.com/repos/dhlab-basel/Knora","forks_url":"https://api.github.com/repos/dhlab-basel/Knora/forks","keys_url":"https://api.github.com/repos/dhlab-basel/Knora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dhlab-basel/Knora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dhlab-basel/Knora/teams","hooks_url":"https://api.github.com/repos/dhlab-basel/Knora/hooks","issue_events_url":"https://api.github.com/repos/dhlab-basel/Knora/issues/events{/number}","events_url":"https://api.github.com/repos/dhlab-basel/Knora/events","assignees_url":"https://api.github.com/repos/dhlab-basel/Knora/assignees{/user}","branches_url":"https://api.github.com/repos/dhlab-basel/Knora/branches{/branch}","tags_url":"https://api.github.com/repos/dhlab-basel/Knora/tags","blobs_url":"https://api.github.com/repos/dhlab-basel/Knora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dhlab-basel/Knora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dhlab-basel/Knora/git/refs{/sha}","trees_url":"https://api.github.com/repos/dhlab-basel/Knora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dhlab-basel/Knora/statuses/{sha}","languages_url":"https://api.github.com/repos/dhlab-basel/Knora/languages","stargazers_url":"https://api.github.com/repos/dhlab-basel/Knora/stargazers","contributors_url":"https://api.github.com/repos/dhlab-basel/Knora/contributors","subscribers_url":"https://api.github.com/repos/dhlab-basel/Knora/subscribers","subscription_url":"https://api.github.com/repos/dhlab-basel/Knora/subscription","commits_url":"https://api.github.com/repos/dhlab-basel/Knora/commits{/sha}","git_commits_url":"https://api.github.com/repos/dhlab-basel/Knora/git/commits{/sha}","comments_url":"https://api.github.com/repos/dhlab-basel/Knora/comments{/number}","issue_comment_url":"https://api.github.com/repos/dhlab-basel/Knora/issues/comments{/number}","contents_url":"https://api.github.com/repos/dhlab-basel/Knora/contents/{+path}","compare_url":"https://api.github.com/repos/dhlab-basel/Knora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dhlab-basel/Knora/merges","archive_url":"https://api.github.com/repos/dhlab-basel/Knora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dhlab-basel/Knora/downloads","issues_url":"https://api.github.com/repos/dhlab-basel/Knora/issues{/number}","pulls_url":"https://api.github.com/repos/dhlab-basel/Knora/pulls{/number}","milestones_url":"https://api.github.com/repos/dhlab-basel/Knora/milestones{/number}","notifications_url":"https://api.github.com/repos/dhlab-basel/Knora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dhlab-basel/Knora/labels{/name}","releases_url":"https://api.github.com/repos/dhlab-basel/Knora/releases{/id}","deployments_url":"https://api.github.com/repos/dhlab-basel/Knora/deployments","created_at":"2015-12-02T14:00:26Z","updated_at":"2016-02-03T14:57:21Z","pushed_at":"2016-03-15T12:38:48Z","git_url":"git://github.com/dhlab-basel/Knora.git","ssh_url":"git@github.com:dhlab-basel/Knora.git","clone_url":"https://github.com/dhlab-basel/Knora.git","svn_url":"https://github.com/dhlab-basel/Knora","homepage":null,"size":67184,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":40,"forks":2,"open_issues":40,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/dhlab-basel/Knora/pulls/87"},"html":{"href":"https://github.com/dhlab-basel/Knora/pull/87"},"issue":{"href":"https://api.github.com/repos/dhlab-basel/Knora/issues/87"},"comments":{"href":"https://api.github.com/repos/dhlab-basel/Knora/issues/87/comments"},"review_comments":{"href":"https://api.github.com/repos/dhlab-basel/Knora/pulls/87/comments"},"review_comment":{"href":"https://api.github.com/repos/dhlab-basel/Knora/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dhlab-basel/Knora/pulls/87/commits"},"statuses":{"href":"https://api.github.com/repos/dhlab-basel/Knora/statuses/d9b21085b3c5d16ac3ee7125d330b0ff781cf1c7"}}}}