restyii icon indicating copy to clipboard operation
restyii copied to clipboard

Handling oauth accessdenied

Open JorgenSmith opened this issue 11 years ago • 1 comments

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

JorgenSmith avatar Aug 20 '13 03:08 JorgenSmith

what does your rbac.php file look like in /app/config ?

have your tried the unrestricted method ?

Marc Teichtahl http://www.teichtahl.com @mteichtahl

On Tuesday, 20 August 2013 at 1:41 PM, Jorgen Smith wrote:

"You are not authorized to perform this action."

mteichtahl avatar Aug 20 '13 03:08 mteichtahl