{"action":"created","comment":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/73211304","id":73211304,"diff_hunk":"@@ -0,0 +1,173 @@\n+\"\"\"Views for the node settings page.\"\"\"\n+# -*- coding: utf-8 -*-\n+import httplib as http\n+\n+from flask import request\n+from modularodm import Q\n+from modularodm.storage.base import KeyExistsException\n+\n+from framework.auth.decorators import must_be_logged_in\n+\n+from website.addons.base import generic_views\n+from owncloud import Client as OwnCloudClient\n+from website.addons.owncloud.model import OwnCloudProvider\n+from website.addons.owncloud.settings import DEFAULT_HOSTS\n+from website.addons.owncloud.serializer import OwnCloudSerializer\n+from website.oauth.models import ExternalAccount\n+from website.project.decorators import (\n+    must_have_addon)\n+from website.util import rubeus, api_url_for\n+\n+from website.addons.owncloud.utils import ExternalAccountConverter\n+\n+SHORT_NAME = 'owncloud'\n+FULL_NAME = 'OwnCloud'\n+\n+owncloud_account_list = generic_views.account_list(\n+    SHORT_NAME,\n+    OwnCloudSerializer\n+)\n+\n+owncloud_import_auth = generic_views.import_auth(\n+    SHORT_NAME,\n+    OwnCloudSerializer\n+)\n+\n+owncloud_deauthorize_node = generic_views.deauthorize_node(\n+    SHORT_NAME\n+)\n+\n+owncloud_get_config = generic_views.get_config(\n+    SHORT_NAME,\n+    OwnCloudSerializer\n+)\n+\n+def owncloud_root_folder(node_settings, auth, **kwargs):","path":"website/addons/owncloud/views.py","position":45,"original_position":45,"commit_id":"b9fcb57ebb58841535a051209878dbcb51edbcac","original_commit_id":"b9fcb57ebb58841535a051209878dbcb51edbcac","user":{"login":"mfraezz","id":5659262,"avatar_url":"https://avatars.githubusercontent.com/u/5659262?v=3","gravatar_id":"","url":"https://api.github.com/users/mfraezz","html_url":"https://github.com/mfraezz","followers_url":"https://api.github.com/users/mfraezz/followers","following_url":"https://api.github.com/users/mfraezz/following{/other_user}","gists_url":"https://api.github.com/users/mfraezz/gists{/gist_id}","starred_url":"https://api.github.com/users/mfraezz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfraezz/subscriptions","organizations_url":"https://api.github.com/users/mfraezz/orgs","repos_url":"https://api.github.com/users/mfraezz/repos","events_url":"https://api.github.com/users/mfraezz/events{/privacy}","received_events_url":"https://api.github.com/users/mfraezz/received_events","type":"User","site_admin":false},"body":"With a small model change, you should be able to use `generic_views.root_folder` for this","created_at":"2016-08-02T18:32:52Z","updated_at":"2016-08-02T18:32:52Z","html_url":"https://github.com/CenterForOpenScience/osf.io/pull/6075#discussion_r73211304","pull_request_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6075","_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/73211304"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/6075#discussion_r73211304"},"pull_request":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6075"}}},"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6075","id":79592424,"html_url":"https://github.com/CenterForOpenScience/osf.io/pull/6075","diff_url":"https://github.com/CenterForOpenScience/osf.io/pull/6075.diff","patch_url":"https://github.com/CenterForOpenScience/osf.io/pull/6075.patch","issue_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/6075","number":6075,"state":"open","locked":false,"title":"[CR] ownCloud Addon","user":{"login":"kwierman","id":1746808,"avatar_url":"https://avatars.githubusercontent.com/u/1746808?v=3","gravatar_id":"","url":"https://api.github.com/users/kwierman","html_url":"https://github.com/kwierman","followers_url":"https://api.github.com/users/kwierman/followers","following_url":"https://api.github.com/users/kwierman/following{/other_user}","gists_url":"https://api.github.com/users/kwierman/gists{/gist_id}","starred_url":"https://api.github.com/users/kwierman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwierman/subscriptions","organizations_url":"https://api.github.com/users/kwierman/orgs","repos_url":"https://api.github.com/users/kwierman/repos","events_url":"https://api.github.com/users/kwierman/events{/privacy}","received_events_url":"https://api.github.com/users/kwierman/received_events","type":"User","site_admin":false},"body":"## Purpose\r\n Provides the ownCloud addon. ownCloud is a cloud based storage platform with a number of different implementations. This addon allows the settings to specify a number of different hosts to utilize and creates settings for the associated storage provider.\r\n\r\n\r\n## Changes\r\n\r\nThese changes *should* be independent of the rest of the osf package.\r\n\r\n## Side effects\r\n \r\nNone at the moment.\r\n\r\n\r\n## Ticket\r\n\r\n<!-- Link to JIRA ticket, if applicable e.g. https://openscience.atlassian.net/browse/OSF-1234 -->\r\n\r\n","created_at":"2016-08-01T15:57:52Z","updated_at":"2016-08-02T18:32:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"900d37caba661fc3eb0f8aefc3e33bd1893ad5fb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6075/commits","review_comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6075/comments","review_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/6075/comments","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/b9fcb57ebb58841535a051209878dbcb51edbcac","head":{"label":"kwierman:feature/owncloud_provider","ref":"feature/owncloud_provider","sha":"b9fcb57ebb58841535a051209878dbcb51edbcac","user":{"login":"kwierman","id":1746808,"avatar_url":"https://avatars.githubusercontent.com/u/1746808?v=3","gravatar_id":"","url":"https://api.github.com/users/kwierman","html_url":"https://github.com/kwierman","followers_url":"https://api.github.com/users/kwierman/followers","following_url":"https://api.github.com/users/kwierman/following{/other_user}","gists_url":"https://api.github.com/users/kwierman/gists{/gist_id}","starred_url":"https://api.github.com/users/kwierman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwierman/subscriptions","organizations_url":"https://api.github.com/users/kwierman/orgs","repos_url":"https://api.github.com/users/kwierman/repos","events_url":"https://api.github.com/users/kwierman/events{/privacy}","received_events_url":"https://api.github.com/users/kwierman/received_events","type":"User","site_admin":false},"repo":{"id":41117918,"name":"osf.io","full_name":"kwierman/osf.io","owner":{"login":"kwierman","id":1746808,"avatar_url":"https://avatars.githubusercontent.com/u/1746808?v=3","gravatar_id":"","url":"https://api.github.com/users/kwierman","html_url":"https://github.com/kwierman","followers_url":"https://api.github.com/users/kwierman/followers","following_url":"https://api.github.com/users/kwierman/following{/other_user}","gists_url":"https://api.github.com/users/kwierman/gists{/gist_id}","starred_url":"https://api.github.com/users/kwierman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwierman/subscriptions","organizations_url":"https://api.github.com/users/kwierman/orgs","repos_url":"https://api.github.com/users/kwierman/repos","events_url":"https://api.github.com/users/kwierman/events{/privacy}","received_events_url":"https://api.github.com/users/kwierman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kwierman/osf.io","description":"Facilitating Open Science","fork":true,"url":"https://api.github.com/repos/kwierman/osf.io","forks_url":"https://api.github.com/repos/kwierman/osf.io/forks","keys_url":"https://api.github.com/repos/kwierman/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kwierman/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kwierman/osf.io/teams","hooks_url":"https://api.github.com/repos/kwierman/osf.io/hooks","issue_events_url":"https://api.github.com/repos/kwierman/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/kwierman/osf.io/events","assignees_url":"https://api.github.com/repos/kwierman/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/kwierman/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/kwierman/osf.io/tags","blobs_url":"https://api.github.com/repos/kwierman/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kwierman/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kwierman/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/kwierman/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kwierman/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/kwierman/osf.io/languages","stargazers_url":"https://api.github.com/repos/kwierman/osf.io/stargazers","contributors_url":"https://api.github.com/repos/kwierman/osf.io/contributors","subscribers_url":"https://api.github.com/repos/kwierman/osf.io/subscribers","subscription_url":"https://api.github.com/repos/kwierman/osf.io/subscription","commits_url":"https://api.github.com/repos/kwierman/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/kwierman/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/kwierman/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/kwierman/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/kwierman/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/kwierman/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kwierman/osf.io/merges","archive_url":"https://api.github.com/repos/kwierman/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kwierman/osf.io/downloads","issues_url":"https://api.github.com/repos/kwierman/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/kwierman/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/kwierman/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/kwierman/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kwierman/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/kwierman/osf.io/releases{/id}","deployments_url":"https://api.github.com/repos/kwierman/osf.io/deployments","created_at":"2015-08-20T20:41:51Z","updated_at":"2016-06-18T20:14:11Z","pushed_at":"2016-08-01T15:54:36Z","git_url":"git://github.com/kwierman/osf.io.git","ssh_url":"git@github.com:kwierman/osf.io.git","clone_url":"https://github.com/kwierman/osf.io.git","svn_url":"https://github.com/kwierman/osf.io","homepage":"http://osf.io","size":137667,"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":"develop"}},"base":{"label":"CenterForOpenScience:develop","ref":"develop","sha":"e6e9338fb2b447c96271be68b1f1aa62449bdc50","user":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"repo":{"id":10199599,"name":"osf.io","full_name":"CenterForOpenScience/osf.io","owner":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CenterForOpenScience/osf.io","description":"Facilitating Open Science","fork":false,"url":"https://api.github.com/repos/CenterForOpenScience/osf.io","forks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/forks","keys_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/teams","hooks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/hooks","issue_events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/events","assignees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/tags","blobs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/languages","stargazers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/stargazers","contributors_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contributors","subscribers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscribers","subscription_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscription","commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/merges","archive_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/downloads","issues_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/releases{/id}","deployments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/deployments","created_at":"2013-05-21T15:53:37Z","updated_at":"2016-07-29T16:29:33Z","pushed_at":"2016-08-02T18:16:08Z","git_url":"git://github.com/CenterForOpenScience/osf.io.git","ssh_url":"git@github.com:CenterForOpenScience/osf.io.git","clone_url":"https://github.com/CenterForOpenScience/osf.io.git","svn_url":"https://github.com/CenterForOpenScience/osf.io","homepage":"http://osf.io","size":288253,"stargazers_count":242,"watchers_count":242,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":195,"mirror_url":null,"open_issues_count":202,"forks":195,"open_issues":202,"watchers":242,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6075"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/6075"},"issue":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/6075"},"comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/6075/comments"},"review_comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6075/comments"},"review_comment":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6075/commits"},"statuses":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/b9fcb57ebb58841535a051209878dbcb51edbcac"}}}}
{"actor":{"display_login":"mfraezz"}}