{"action":"created","comment":{"url":"https://api.github.com/repos/owncloud/core/pulls/comments/26508589","id":26508589,"diff_hunk":"@@ -0,0 +1,272 @@\n+<?php\n+/**\n+ * Copyright (c) 2015 Vincent Petry <pvince81@owncloud.com>\n+ * This file is licensed under the Affero General Public License version 3 or\n+ * later.\n+ * See the COPYING-README file.\n+ */\n+\n+namespace OCA\\Files_external\\Lib;\n+\n+/**\n+ * External storage configuration\n+ */\n+class StorageConfig implements \\JsonSerializable {\n+\n+\t/**\n+\t * @var int\n+\t */\n+\tprivate $id;\n+\n+\t/**\n+\t * @var string\n+\t */\n+\tprivate $backendClass;\n+\n+\t/**\n+\t * @var array\n+\t */\n+\tprivate $backendOptions = [];\n+\n+\t/**\n+\t * @var string\n+\t */\n+\tprivate $mountPoint;\n+\n+\t/**\n+\t * @var int\n+\t */\n+\tprivate $status;\n+\n+\t/**\n+\t * @var int\n+\t */\n+\tprivate $priority;\n+\n+\t/**\n+\t * @var array\n+\t */\n+\tprivate $applicableUsers = [];\n+\n+\t/**\n+\t * @var array\n+\t */\n+\tprivate $applicableGroups = [];\n+\n+\t/**\n+\t * @var array\n+\t */\n+\tprivate $mountOptions = [];\n+\n+\t/**\n+\t * @param int|null $id config id or null for a new config\n+\t */\n+\tpublic function __construct($id = null) {\n+\t\t$this->id = $id;\n+\t}\n+\n+\t/**\n+\t * Returns the configuration id\n+\t *\n+\t * @return int\n+\t */\n+\tpublic function getId() {\n+\t\treturn $this->id;\n+\t}\n+\n+\t/**\n+\t * Sets the configuration id\n+\t *\n+\t * @param int configuration id\n+\t */\n+\tpublic function setId($id) {\n+\t\t$this->id = $id;\n+\t}\n+\n+\t/**\n+\t * Returns mount point path relative to the user's\n+\t * \"files\" folder.\n+\t *\n+\t * @return string path\n+\t */\n+\tpublic function getMountPoint() {\n+\t\treturn $this->mountPoint;\n+\t}\n+\n+\t/**\n+\t * Sets mount point path relative to the user's\n+\t * \"files\" folder.\n+\t * The path will be normalized.\n+\t *\n+\t * @param string path\n+\t */\n+\tpublic function setMountPoint($mountPoint) {\n+\t\t$this->mountPoint = \\OC\\Files\\Filesystem::normalizePath($mountPoint);\n+\t}\n+\n+\t/**\n+\t * Returns the external storage backend class name\n+\t *\n+\t * @return string external storage backend class name\n+\t */\n+\tpublic function getBackendClass() {\n+\t\treturn $this->backendClass;\n+\t}\n+\n+\t/**\n+\t * Sets the external storage backend class name\n+\t *\n+\t * @param string external storage backend class name\n+\t */\n+\tpublic function setBackendClass($backendClass) {\n+\t\t$this->backendClass = $backendClass;\n+\t}\n+\n+\t/**\n+\t * Returns the external storage backend-specific options\n+\t *\n+\t * @return array backend options\n+\t */\n+\tpublic function getBackendOptions() {\n+\t\treturn $this->backendOptions;\n+\t}\n+\n+\t/**\n+\t * Sets the external storage backend-specific options\n+\t *\n+\t * @param array backend options\n+\t */\n+\tpublic function setBackendOptions($backendOptions) {\n+\t\t$this->backendOptions = $backendOptions;\n+\t}\n+\n+\t/**\n+\t * Returns the mount priority\n+\t *\n+\t * @return int priority\n+\t */\n+\tpublic function getPriority() {\n+\t\treturn $this->priority;\n+\t}\n+\n+\t/**\n+\t * Sets the mount priotity\n+\t *\n+\t * @param int priority","path":"apps/files_external/lib/storageconfig.php","position":155,"original_position":155,"commit_id":"847880803e9bdbaae332762e197ac13ffe552233","original_commit_id":"847880803e9bdbaae332762e197ac13ffe552233","user":{"login":"LukasReschke","id":878997,"avatar_url":"https://avatars.githubusercontent.com/u/878997?v=3","gravatar_id":"","url":"https://api.github.com/users/LukasReschke","html_url":"https://github.com/LukasReschke","followers_url":"https://api.github.com/users/LukasReschke/followers","following_url":"https://api.github.com/users/LukasReschke/following{/other_user}","gists_url":"https://api.github.com/users/LukasReschke/gists{/gist_id}","starred_url":"https://api.github.com/users/LukasReschke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LukasReschke/subscriptions","organizations_url":"https://api.github.com/users/LukasReschke/orgs","repos_url":"https://api.github.com/users/LukasReschke/repos","events_url":"https://api.github.com/users/LukasReschke/events{/privacy}","received_events_url":"https://api.github.com/users/LukasReschke/received_events","type":"User","site_admin":false},"body":"as well","created_at":"2015-03-16T17:38:59Z","updated_at":"2015-03-16T17:38:59Z","html_url":"https://github.com/owncloud/core/pull/11884#discussion_r26508589","pull_request_url":"https://api.github.com/repos/owncloud/core/pulls/11884","_links":{"self":{"href":"https://api.github.com/repos/owncloud/core/pulls/comments/26508589"},"html":{"href":"https://github.com/owncloud/core/pull/11884#discussion_r26508589"},"pull_request":{"href":"https://api.github.com/repos/owncloud/core/pulls/11884"}}},"pull_request":{"url":"https://api.github.com/repos/owncloud/core/pulls/11884","id":23668068,"html_url":"https://github.com/owncloud/core/pull/11884","diff_url":"https://github.com/owncloud/core/pull/11884.diff","patch_url":"https://github.com/owncloud/core/pull/11884.patch","issue_url":"https://api.github.com/repos/owncloud/core/issues/11884","number":11884,"state":"open","locked":false,"title":"Cleanup ext storage CRUD code, introduce storage config id","user":{"login":"PVince81","id":277525,"avatar_url":"https://avatars.githubusercontent.com/u/277525?v=3","gravatar_id":"","url":"https://api.github.com/users/PVince81","html_url":"https://github.com/PVince81","followers_url":"https://api.github.com/users/PVince81/followers","following_url":"https://api.github.com/users/PVince81/following{/other_user}","gists_url":"https://api.github.com/users/PVince81/gists{/gist_id}","starred_url":"https://api.github.com/users/PVince81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PVince81/subscriptions","organizations_url":"https://api.github.com/users/PVince81/orgs","repos_url":"https://api.github.com/users/PVince81/repos","events_url":"https://api.github.com/users/PVince81/events{/privacy}","received_events_url":"https://api.github.com/users/PVince81/received_events","type":"User","site_admin":false},"body":"Tried to make the external storage app code more meaningful.\r\n\r\nBut I hit against hard blocks like this: https://github.com/owncloud/core/blob/master/apps/files_external/js/settings.js#L136\r\nCalling \"removeMountPoint.php\" for EVERY user ?\r\n\r\nAlso the lack of \"id\" makes it impossible to continue.\r\nWill try and introduce a proper id in a separate PR first...\r\n","created_at":"2014-10-31T10:43:49Z","updated_at":"2015-03-16T17:38:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2b269ef148238e32047e32e566cfc11c404da110","assignee":null,"milestone":{"url":"https://api.github.com/repos/owncloud/core/milestones/31","html_url":"https://github.com/owncloud/core/milestones/8.1-current","labels_url":"https://api.github.com/repos/owncloud/core/milestones/31/labels","id":912160,"number":31,"title":"8.1-current","description":"","creator":{"login":"MorrisJobke","id":245432,"avatar_url":"https://avatars.githubusercontent.com/u/245432?v=3","gravatar_id":"","url":"https://api.github.com/users/MorrisJobke","html_url":"https://github.com/MorrisJobke","followers_url":"https://api.github.com/users/MorrisJobke/followers","following_url":"https://api.github.com/users/MorrisJobke/following{/other_user}","gists_url":"https://api.github.com/users/MorrisJobke/gists{/gist_id}","starred_url":"https://api.github.com/users/MorrisJobke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MorrisJobke/subscriptions","organizations_url":"https://api.github.com/users/MorrisJobke/orgs","repos_url":"https://api.github.com/users/MorrisJobke/repos","events_url":"https://api.github.com/users/MorrisJobke/events{/privacy}","received_events_url":"https://api.github.com/users/MorrisJobke/received_events","type":"User","site_admin":false},"open_issues":267,"closed_issues":366,"state":"open","created_at":"2014-12-22T12:04:01Z","updated_at":"2015-03-16T16:33:37Z","due_on":"2015-04-02T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/owncloud/core/pulls/11884/commits","review_comments_url":"https://api.github.com/repos/owncloud/core/pulls/11884/comments","review_comment_url":"https://api.github.com/repos/owncloud/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/owncloud/core/issues/11884/comments","statuses_url":"https://api.github.com/repos/owncloud/core/statuses/847880803e9bdbaae332762e197ac13ffe552233","head":{"label":"owncloud:ext-appframework","ref":"ext-appframework","sha":"847880803e9bdbaae332762e197ac13ffe552233","user":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?v=3","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"repo":{"id":5550552,"name":"core","full_name":"owncloud/core","owner":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?v=3","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/owncloud/core","description":"The ownCloud core","fork":false,"url":"https://api.github.com/repos/owncloud/core","forks_url":"https://api.github.com/repos/owncloud/core/forks","keys_url":"https://api.github.com/repos/owncloud/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/owncloud/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/owncloud/core/teams","hooks_url":"https://api.github.com/repos/owncloud/core/hooks","issue_events_url":"https://api.github.com/repos/owncloud/core/issues/events{/number}","events_url":"https://api.github.com/repos/owncloud/core/events","assignees_url":"https://api.github.com/repos/owncloud/core/assignees{/user}","branches_url":"https://api.github.com/repos/owncloud/core/branches{/branch}","tags_url":"https://api.github.com/repos/owncloud/core/tags","blobs_url":"https://api.github.com/repos/owncloud/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/owncloud/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/owncloud/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/owncloud/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/owncloud/core/statuses/{sha}","languages_url":"https://api.github.com/repos/owncloud/core/languages","stargazers_url":"https://api.github.com/repos/owncloud/core/stargazers","contributors_url":"https://api.github.com/repos/owncloud/core/contributors","subscribers_url":"https://api.github.com/repos/owncloud/core/subscribers","subscription_url":"https://api.github.com/repos/owncloud/core/subscription","commits_url":"https://api.github.com/repos/owncloud/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/owncloud/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/owncloud/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/owncloud/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/owncloud/core/contents/{+path}","compare_url":"https://api.github.com/repos/owncloud/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/owncloud/core/merges","archive_url":"https://api.github.com/repos/owncloud/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/owncloud/core/downloads","issues_url":"https://api.github.com/repos/owncloud/core/issues{/number}","pulls_url":"https://api.github.com/repos/owncloud/core/pulls{/number}","milestones_url":"https://api.github.com/repos/owncloud/core/milestones{/number}","notifications_url":"https://api.github.com/repos/owncloud/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/owncloud/core/labels{/name}","releases_url":"https://api.github.com/repos/owncloud/core/releases{/id}","created_at":"2012-08-25T10:32:48Z","updated_at":"2015-03-16T16:14:11Z","pushed_at":"2015-03-16T16:57:42Z","git_url":"git://github.com/owncloud/core.git","ssh_url":"git@github.com:owncloud/core.git","clone_url":"https://github.com/owncloud/core.git","svn_url":"https://github.com/owncloud/core","homepage":null,"size":955162,"stargazers_count":3135,"watchers_count":3135,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1006,"mirror_url":null,"open_issues_count":1841,"forks":1006,"open_issues":1841,"watchers":3135,"default_branch":"master"}},"base":{"label":"owncloud:master","ref":"master","sha":"23cc3cc5f2f42166c37fbe03fa62d3dd1dbfe5ed","user":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?v=3","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"repo":{"id":5550552,"name":"core","full_name":"owncloud/core","owner":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?v=3","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/owncloud/core","description":"The ownCloud core","fork":false,"url":"https://api.github.com/repos/owncloud/core","forks_url":"https://api.github.com/repos/owncloud/core/forks","keys_url":"https://api.github.com/repos/owncloud/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/owncloud/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/owncloud/core/teams","hooks_url":"https://api.github.com/repos/owncloud/core/hooks","issue_events_url":"https://api.github.com/repos/owncloud/core/issues/events{/number}","events_url":"https://api.github.com/repos/owncloud/core/events","assignees_url":"https://api.github.com/repos/owncloud/core/assignees{/user}","branches_url":"https://api.github.com/repos/owncloud/core/branches{/branch}","tags_url":"https://api.github.com/repos/owncloud/core/tags","blobs_url":"https://api.github.com/repos/owncloud/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/owncloud/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/owncloud/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/owncloud/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/owncloud/core/statuses/{sha}","languages_url":"https://api.github.com/repos/owncloud/core/languages","stargazers_url":"https://api.github.com/repos/owncloud/core/stargazers","contributors_url":"https://api.github.com/repos/owncloud/core/contributors","subscribers_url":"https://api.github.com/repos/owncloud/core/subscribers","subscription_url":"https://api.github.com/repos/owncloud/core/subscription","commits_url":"https://api.github.com/repos/owncloud/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/owncloud/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/owncloud/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/owncloud/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/owncloud/core/contents/{+path}","compare_url":"https://api.github.com/repos/owncloud/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/owncloud/core/merges","archive_url":"https://api.github.com/repos/owncloud/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/owncloud/core/downloads","issues_url":"https://api.github.com/repos/owncloud/core/issues{/number}","pulls_url":"https://api.github.com/repos/owncloud/core/pulls{/number}","milestones_url":"https://api.github.com/repos/owncloud/core/milestones{/number}","notifications_url":"https://api.github.com/repos/owncloud/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/owncloud/core/labels{/name}","releases_url":"https://api.github.com/repos/owncloud/core/releases{/id}","created_at":"2012-08-25T10:32:48Z","updated_at":"2015-03-16T16:14:11Z","pushed_at":"2015-03-16T16:57:42Z","git_url":"git://github.com/owncloud/core.git","ssh_url":"git@github.com:owncloud/core.git","clone_url":"https://github.com/owncloud/core.git","svn_url":"https://github.com/owncloud/core","homepage":null,"size":955162,"stargazers_count":3135,"watchers_count":3135,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1006,"mirror_url":null,"open_issues_count":1841,"forks":1006,"open_issues":1841,"watchers":3135,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/owncloud/core/pulls/11884"},"html":{"href":"https://github.com/owncloud/core/pull/11884"},"issue":{"href":"https://api.github.com/repos/owncloud/core/issues/11884"},"comments":{"href":"https://api.github.com/repos/owncloud/core/issues/11884/comments"},"review_comments":{"href":"https://api.github.com/repos/owncloud/core/pulls/11884/comments"},"review_comment":{"href":"https://api.github.com/repos/owncloud/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/owncloud/core/pulls/11884/commits"},"statuses":{"href":"https://api.github.com/repos/owncloud/core/statuses/847880803e9bdbaae332762e197ac13ffe552233"}}}}