Handling oauth accessdenied
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 15
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
Hi -
I've come across an issue where in #117 @ fetchResource in
../vendor/codemix/restyii/src/Restyii/Client/Schema/Schema.php
$config will be e.g.
```
array(8) {
'code' =>
int(403)
'type' =>
string(14) "CHttpException"
'errorCode' =>
int(0)
'message' =>
string(46) "You are not authorized to perform this action."
'file' =>
string(71) "/vagrant/vendor/yiisoft/yii/framework/web/auth/CAccessControlFilter.php"
'line' =>
int(182)
'trace' =>
string(1253) "#0 /vagrant/vendor/yiisoft/yii/framework/web/auth/CAccessControlFilter.php(145): CAccessControlFilter->accessDenied(Object(WebUser), \'You are not aut...\')\n#1 /vagrant/vendor/yiisoft/yii/framework/web/filters/CFilter.php(38): CAccessControlFilter->preFilter(Object(CFilterChain))\n#2 /vagrant/vendor/yiisoft/yii/framework/web/CController.php(1145): CFilter->filter(Object(CFilterChain))\n#3 /vagrant/vendor/yiisoft/yii/framework/web/filters/CInlineFilter.php(58): CController->filterAccessControl(Object(CFilte"...
'traces' =>
```
This results in
```
[..]/Restyii/Client/Schema/AbstractEntity.php(33): CComponent->__set('code', 403)
// -->
exception 'CException' with message 'Property "Restyii\Client\Schema\Resource.code" is not defined.' [..]/vendor/yiisoft/yii/framework/base/CComponent.php:173
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at fetchResource in vendor/codemix/restyii/src/Restyii/Client/Schema/Schema.php and trace how the 403 access-denied response reaches AbstractEntity.php. Reproduce the failure and inspect the reported Resource.code assignment; the issue does not specify the intended behavior after access denial, so confirm the expected outcome before defining what done means.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100