{"id":16767066,"url":"https://github.com/assert6/hyperf-permission","last_synced_at":"2025-03-16T13:12:57.075Z","repository":{"id":148412003,"uuid":"380937051","full_name":"assert6/hyperf-permission","owner":"assert6","description":"调用权","archived":false,"fork":false,"pushed_at":"2023-08-17T03:40:08.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-23T00:42:26.469Z","etag":null,"topics":["hyperf"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/assert6.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-06-28T07:02:14.000Z","updated_at":"2023-08-17T03:40:13.000Z","dependencies_parsed_at":"2025-01-23T00:42:26.007Z","dependency_job_id":"65bd0ec5-fc46-4d5f-b145-fd1a159cdd6b","html_url":"https://github.com/assert6/hyperf-permission","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assert6%2Fhyperf-permission","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assert6%2Fhyperf-permission/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assert6%2Fhyperf-permission/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assert6%2Fhyperf-permission/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/assert6","download_url":"https://codeload.github.com/assert6/hyperf-permission/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243871912,"owners_count":20361380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["hyperf"],"created_at":"2024-10-13T06:08:22.259Z","updated_at":"2025-03-16T13:12:57.062Z","avatar_url":"https://github.com/assert6.png","language":"PHP","readme":"# 调用权\n```php\nclass Test\n{\n    #[Permission]\n    public function test()\n    {\n        return [1111];\n    }\n}\n```\n```php\nclass TestController\n{\n    #[Inject]\n    protected Test $test;\n\n    #[Authorize('App\\Test::test')]\n    public function test()\n    {\n        // Authorization::authorize('App\\Test::test');\n        return $this-\u003etest-\u003etest();\n    }\n}\n```\n\u003e 当调用`#[Permission]`声明的代码时, 需要`#[Authorize]`或`Authorization::authorize()`授权, 否则抛`PermissionException`","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fassert6%2Fhyperf-permission","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fassert6%2Fhyperf-permission","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fassert6%2Fhyperf-permission/lists"}