{"id":25858776,"url":"https://github.com/arcletproject/cithun","last_synced_at":"2026-01-24T02:40:27.254Z","repository":{"id":115203184,"uuid":"457425739","full_name":"ArcletProject/Cithun","owner":"ArcletProject","description":"FS-Like Permission System","archived":false,"fork":false,"pushed_at":"2025-12-18T01:20:20.000Z","size":270,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-19T14:13:37.948Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArcletProject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-02-09T15:53:30.000Z","updated_at":"2025-12-18T01:20:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"f6a36041-3d4d-415f-ad1e-ca097845c35a","html_url":"https://github.com/ArcletProject/Cithun","commit_stats":null,"previous_names":["arcletproject/cithun"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ArcletProject/Cithun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcletProject%2FCithun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcletProject%2FCithun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcletProject%2FCithun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcletProject%2FCithun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArcletProject","download_url":"https://codeload.github.com/ArcletProject/Cithun/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcletProject%2FCithun/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28708204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T23:51:44.727Z","status":"online","status_checked_at":"2026-01-24T02:00:06.909Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-01T20:33:42.112Z","updated_at":"2026-01-24T02:40:27.249Z","avatar_url":"https://github.com/ArcletProject.png","language":"Python","readme":"# Cithun\n\n仿照 Linux 下的文件权限系统实现的权限管理系统。\n\n## 特性\n\n- 通过类似 Linux 下的文件权限系统的方式管理权限\n- 支持用户组\n- 支持用户组继承\n\n## Example\n\n```python\nfrom arclet.cithun import Permission\nfrom arclet.cithun.builtins import System\n\nsystem = System(\"data.json\")\n\nwith system.transaction():\n    AUTH_1 = system.create_role(\"ROLE_AUTH_1\", \"AUTH_1\")\n    AUTH_2 = system.create_role(\"ROLE_AUTH_2\", \"AUTH_2\")\n    AUTH_3 = system.create_role(\"ROLE_AUTH_3\", \"AUTH_3\")\n    AUTH_4 = system.create_role(\"ROLE_AUTH_4\", \"AUTH_4\")\n    AUTH_5 = system.create_role(\"ROLE_AUTH_5\", \"AUTH_5\")\n    system.inherit(AUTH_2, AUTH_1)\n    system.inherit(AUTH_3, AUTH_2)\n    system.inherit(AUTH_4, AUTH_3)\n    system.inherit(AUTH_5, AUTH_4)\n    alice = system.create_user(\"alice\", \"Alice\")\n    bob = system.create_user(\"bob\", \"Bob\")\n    carol = system.create_user(\"carol\", \"Carol\")\n    system.inherit(alice, AUTH_1)\n    system.inherit(bob, AUTH_3)\n    system.inherit(carol, AUTH_5)\n\n    system.assign(AUTH_1, \"app\", Permission.AVAILABLE)\n    system.assign(AUTH_3, \"app\", Permission.VISIT)\n    system.assign(AUTH_5, \"app.data\", Permission.AVAILABLE | Permission.VISIT | Permission.MODIFY)\n\n    system.assign(AUTH_4, \"app.secret\", Permission.AVAILABLE | Permission.VISIT)\n    system.assign(alice, \"app.data\", Permission.MODIFY)\n    system.assign(bob, \"app.config\", Permission.MODIFY)\n\n    system.depend(alice, \"app.data\", AUTH_4, \"app.secret\", Permission.VISIT)\n    system.depend(bob, \"app.config\", alice, \"app.data\",Permission.VISIT)\n\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcletproject%2Fcithun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farcletproject%2Fcithun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcletproject%2Fcithun/lists"}