Title: Permissions Registry & Support for Vanilla's OP System · Issue #484 · feather-rs/feather · GitHub
Open Graph Title: Permissions Registry & Support for Vanilla's OP System · Issue #484 · feather-rs/feather
X Title: Permissions Registry & Support for Vanilla's OP System · Issue #484 · feather-rs/feather
Description: Through discussion in previous months on the discord, I think(?) the idea of supporting Bukkit-style permissions natively. We must, of course, additionally support the Vanilla-style OP system since it is actually weirdly a part of the pr...
Open Graph Description: Through discussion in previous months on the discord, I think(?) the idea of supporting Bukkit-style permissions natively. We must, of course, additionally support the Vanilla-style OP system since...
X Description: Through discussion in previous months on the discord, I think(?) the idea of supporting Bukkit-style permissions natively. We must, of course, additionally support the Vanilla-style OP system since...
Opengraph URL: https://github.com/feather-rs/feather/issues/484
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Permissions Registry \u0026 Support for Vanilla's OP System","articleBody":"Through discussion in previous months on the discord, I think(?) the idea of supporting Bukkit-style permissions natively. We must, of course, additionally support the Vanilla-style OP system since it is actually weirdly a part of the protocol. This issue outlines our steps forward in implementing this feature, considerations, and future steps to complete it.\r\n\r\n## Now\r\nOur priority is to get something we can build on later, and this suits that need pretty well. The process of updating it shouldn't change much in existing usage of the permissions registry, which is a good sign that this path forward is the one to take.\r\n\r\nThe permissions system will involve two main parts:\r\n- The permissions registry which holds all information from the `perms.json` file after load-time (at the beginning of the server's execution or after some form of reload command). This is just a cache of the file on the disk already loaded into structures that will allow for easy querying.\r\n- The component that is attached to all `Player` entities that stores their permissions.\r\n\r\nAdditionally, something similar to these types will be used to store permissions:\r\n```rs\r\npub struct VanillaPermissions {\r\n /// The OP level\r\n level: u8,\r\n /// Whether the player bypasses player count limits\r\n bypasses_player_limit: bool\r\n}\r\n```\r\n\r\nHaven't figured out how to name this struct though\r\n```rs\r\npub struct FooPermissions {\r\n /// A map of permission keys to values\r\n permissions: HashMap\u003cString, String\u003e\r\n}\r\n```\r\n\r\nThis is the struct that will be used as a component.\r\n```rs\r\npub struct PlayerPermissions {\r\n vanilla_permissions: VanillaPermissions,\r\n foo_permissions: FooPermissions\r\n}\r\n```\r\n\r\nThere needs to be chaperone types to serde the permissions, but that's straightforward. \r\n\r\n\r\nThe registry type can be whatever works, probably something like a `HashMap\u003cUuid, CombinedPermissionsStorage\u003e`.\r\n\r\n\r\nIt's important to maintain compat, so OP level should be saved to the `ops.json` file.\r\n\r\n\r\nThe op level should have a magic key `minecraft.opLevel` or similar that causes it to be written into the vanilla permissions instead of the bukkit-style system.\r\n\r\n### **For now, permissions should be able to be queried, added, loaded on server load, saved on player leave (at a minimum)**\r\n\r\n## Soon\r\nThe things described in this part of the issue are things we need to do soon, but aren't requirements (nor should they be added) for the first implementation of the system.\r\n\r\nHigher priority:\r\n- [ ] **Typed permission values**\r\n- [ ] **Quill support for permissions**\r\n\r\nLower priority:\r\n- [ ] Commands to query permissions information\r\n- [ ] Utility trait to make querying permissions easier","author":{"url":"https://github.com/ambeeeeee","@type":"Person","name":"ambeeeeee"},"datePublished":"2021-09-25T11:00:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/484/feather/issues/484"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c75220a8-48cd-a1d3-4fd1-ca84352ff1df |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C278:6C0D0:C9585B:FFDE66:69915CAA |
| html-safe-nonce | 7dd678b9c929250d794b69f75f6116e60237ebc4b1f35fdda66fd539a0dd0099 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjc4OjZDMEQwOkM5NTg1QjpGRkRFNjY6Njk5MTVDQUEiLCJ2aXNpdG9yX2lkIjoiMTQ0NTAzMTY3NjgxMjAyNTAwMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c5229ba6420461d81ee8d4ca42a976c7c2909ce1323e144a603bdc792a3f792b |
| hovercard-subject-tag | issue:1007055390 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/feather-rs/feather/484/issue_layout |
| twitter:image | https://opengraph.githubassets.com/beb840569602e5215db54a4ff8d2e5516d00626e1460744fdc1492112ce965b5/feather-rs/feather/issues/484 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/beb840569602e5215db54a4ff8d2e5516d00626e1460744fdc1492112ce965b5/feather-rs/feather/issues/484 |
| og:image:alt | Through discussion in previous months on the discord, I think(?) the idea of supporting Bukkit-style permissions natively. We must, of course, additionally support the Vanilla-style OP system since... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ambeeeeee |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/feather-rs/feather git https://github.com/feather-rs/feather.git |
| octolytics-dimension-user_id | 54925191 |
| octolytics-dimension-user_login | feather-rs |
| octolytics-dimension-repository_id | 191701609 |
| octolytics-dimension-repository_nwo | feather-rs/feather |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 191701609 |
| octolytics-dimension-repository_network_root_nwo | feather-rs/feather |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 848bc6032dcc93a9a7301dcc3f379a72ba13b96e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width