{"action":"created","issue":{"url":"https://api.github.com/repos/DICE-UNC/jargon/issues/138","labels_url":"https://api.github.com/repos/DICE-UNC/jargon/issues/138/labels{/name}","comments_url":"https://api.github.com/repos/DICE-UNC/jargon/issues/138/comments","events_url":"https://api.github.com/repos/DICE-UNC/jargon/issues/138/events","html_url":"https://github.com/DICE-UNC/jargon/issues/138","id":98811097,"number":138,"title":"Permission clarification","user":{"login":"deardooley","id":785202,"avatar_url":"https://avatars.githubusercontent.com/u/785202?v=3","gravatar_id":"","url":"https://api.github.com/users/deardooley","html_url":"https://github.com/deardooley","followers_url":"https://api.github.com/users/deardooley/followers","following_url":"https://api.github.com/users/deardooley/following{/other_user}","gists_url":"https://api.github.com/users/deardooley/gists{/gist_id}","starred_url":"https://api.github.com/users/deardooley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deardooley/subscriptions","organizations_url":"https://api.github.com/users/deardooley/orgs","repos_url":"https://api.github.com/users/deardooley/repos","events_url":"https://api.github.com/users/deardooley/events{/privacy}","received_events_url":"https://api.github.com/users/deardooley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-03T18:30:12Z","updated_at":"2015-08-10T17:27:05Z","closed_at":null,"body":"Can you clarify the jargon permission model vs the irods model? I'm unclear how Jargon reading vs writing permissions. I see this snippet in `DataObjectAOImp#setAccessPermission`\r\n\r\n```java\r\n\t\tif (filePermission == FilePermissionEnum.OWN) {\r\n\t\t\tsetAccessPermissionOwn(zone, absolutePath, userName);\r\n\t\t} else if (filePermission == FilePermissionEnum.READ) {\r\n\t\t\tsetAccessPermissionRead(zone, absolutePath, userName);\r\n\t\t} else if (filePermission == FilePermissionEnum.WRITE) {\r\n\t\t\tsetAccessPermissionWrite(zone, absolutePath, userName);\r\n\t\t} else if (filePermission == FilePermissionEnum.NONE) {\r\n\t\t\tremoveAccessPermissionsForUser(zone, absolutePath, userName);\r\n\t\t} else {\r\n\t\t\tthrow new JargonException(\r\n\t\t\t\t\t\"Cannot update permission, currently only READ, WRITE, and OWN, and NONE are supported\");\r\n\t\t}\r\n```\r\n\r\nThis has been an ongoing question for me, so I thought I'd pose it formally here:\r\n1. It looks like I can't set anything other than one of three discrete permissions, `FilePermissionEnum#OWN`, or `FilePermissionEnum#NONE`. Is there an interface for permission arithmatic I should consult? \r\n2. What is the order of precedence when setting the permissions?  `FilePermissionEnum#getPermissionNumericValue` does not follow unix ordering, so what is the expected behavior when adding one permission to an existing permission? \r\n3. From my tests, it looks like setting `FilePermissionEnum#WRITE` permission on a file you own results in a `FilePermissionEnum#MODIFY_METADATA` permission (which is returned as `modify object` by the iCommands, and `modify` by `FilePermissionEnum#MODIFY_METADATA#name` and `FilePermissionEnum#MODIFY_METADATA#toString`). What does it mean to remove a permission? \r\n4. `FilePermissionEnum#EXECUTE` has a smaller  `#permissionNumericValue` value than `FilePermissionEnum#READ`. so does removing `FilePermissionEnum#READ` permission imply the user should have `FilePermissionEnum#EXECUTE` permission? \r\n5. Should we assume the user always has `READ` when they have `WRITE` permission?\r\n6. What is the intended behavior when the owner of a data object or collection removes their permission on an object? Should they be able to add it back in, or should they be treated as a normal user from then on?"},"comment":{"url":"https://api.github.com/repos/DICE-UNC/jargon/issues/comments/129538176","html_url":"https://github.com/DICE-UNC/jargon/issues/138#issuecomment-129538176","issue_url":"https://api.github.com/repos/DICE-UNC/jargon/issues/138","id":129538176,"user":{"login":"michael-conway","id":1097261,"avatar_url":"https://avatars.githubusercontent.com/u/1097261?v=3","gravatar_id":"","url":"https://api.github.com/users/michael-conway","html_url":"https://github.com/michael-conway","followers_url":"https://api.github.com/users/michael-conway/followers","following_url":"https://api.github.com/users/michael-conway/following{/other_user}","gists_url":"https://api.github.com/users/michael-conway/gists{/gist_id}","starred_url":"https://api.github.com/users/michael-conway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael-conway/subscriptions","organizations_url":"https://api.github.com/users/michael-conway/orgs","repos_url":"https://api.github.com/users/michael-conway/repos","events_url":"https://api.github.com/users/michael-conway/events{/privacy}","received_events_url":"https://api.github.com/users/michael-conway/received_events","type":"User","site_admin":false},"created_at":"2015-08-10T17:27:05Z","updated_at":"2015-08-10T17:27:05Z","body":"Yep, in the past, Jargon had to overhead a lot of things that the server would not do, and we're now seeing a migration back to the server, especially as the new API starts feeding in."}}