{"action":"created","issue":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1876","repository_url":"https://api.github.com/repos/SpongePowered/SpongeAPI","labels_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1876/labels{/name}","comments_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1876/comments","events_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1876/events","html_url":"https://github.com/SpongePowered/SpongeAPI/issues/1876","id":344412971,"node_id":"MDU6SXNzdWUzNDQ0MTI5NzE=","number":1876,"title":"Permission api - no way to reorder parents","user":{"login":"XakepSDK","id":4938483,"node_id":"MDQ6VXNlcjQ5Mzg0ODM=","avatar_url":"https://avatars1.githubusercontent.com/u/4938483?v=4","gravatar_id":"","url":"https://api.github.com/users/XakepSDK","html_url":"https://github.com/XakepSDK","followers_url":"https://api.github.com/users/XakepSDK/followers","following_url":"https://api.github.com/users/XakepSDK/following{/other_user}","gists_url":"https://api.github.com/users/XakepSDK/gists{/gist_id}","starred_url":"https://api.github.com/users/XakepSDK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XakepSDK/subscriptions","organizations_url":"https://api.github.com/users/XakepSDK/orgs","repos_url":"https://api.github.com/users/XakepSDK/repos","events_url":"https://api.github.com/users/XakepSDK/events{/privacy}","received_events_url":"https://api.github.com/users/XakepSDK/received_events","type":"User","site_admin":false},"labels":[{"id":653167114,"node_id":"MDU6TGFiZWw2NTMxNjcxMTQ=","url":"https://api.github.com/repos/SpongePowered/SpongeAPI/labels/system:%20permission","name":"system: permission","color":"7ab7df","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-07-25T11:58:16Z","updated_at":"2018-07-25T19:11:47Z","closed_at":null,"author_association":"NONE","body":"There is no way to reorder parents! Only one way is to get all parents in all contexts, find required context, create mutable copy of parents list, order it in a correct way, clear all parents in a context and then re-ad them in a loop using\r\n```\r\naddParent(Set<Context> contexts, SubjectReference parent);\r\n```\r\nSuggestion: add method `setParents(Set<Context> contexts, List<SubjectReference>);` to set all parents directly.\r\nWhy? You can say, that i can just write in first way, but `addParent` returns `CompletableFuture<Boolean>`, this means, that this operation should write data to a storage. Many calls may decrease IO performance, also, it prevents implementation to use optimizations for bulk changes."},"comment":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/comments/407863920","html_url":"https://github.com/SpongePowered/SpongeAPI/issues/1876#issuecomment-407863920","issue_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1876","id":407863920,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzg2MzkyMA==","user":{"login":"XakepSDK","id":4938483,"node_id":"MDQ6VXNlcjQ5Mzg0ODM=","avatar_url":"https://avatars1.githubusercontent.com/u/4938483?v=4","gravatar_id":"","url":"https://api.github.com/users/XakepSDK","html_url":"https://github.com/XakepSDK","followers_url":"https://api.github.com/users/XakepSDK/followers","following_url":"https://api.github.com/users/XakepSDK/following{/other_user}","gists_url":"https://api.github.com/users/XakepSDK/gists{/gist_id}","starred_url":"https://api.github.com/users/XakepSDK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XakepSDK/subscriptions","organizations_url":"https://api.github.com/users/XakepSDK/orgs","repos_url":"https://api.github.com/users/XakepSDK/repos","events_url":"https://api.github.com/users/XakepSDK/events{/privacy}","received_events_url":"https://api.github.com/users/XakepSDK/received_events","type":"User","site_admin":false},"created_at":"2018-07-25T19:11:47Z","updated_at":"2018-07-25T19:11:47Z","author_association":"NONE","body":"Ok. Btw, method to set parents in given context may be useful."}}
{"actor":{"display_login":"XakepSDK"}}