i had an issue when uploading images via the xotof app on android.
the stack trace was:
2012-06-11 20:51:08 +00:00 --- error: Kohana_Exception [ 403 ]: @todo FORBIDDEN
/var/www/vhosts/mydomnain/htdocs/modules/gallery/helpers/access.php [ 202 ]
#0 /var/www/vhosts/mydomnain/htdocs/modules/gallery/helpers/access.php(129): access_Core::forbidden()
#1 /var/www/vhosts/mydomnain/htdocs/modules/gallery/helpers/item_rest.php(153): access_Core::required('edit', Object(Item_Model))
#2 [internal function]: item_rest_Core::post(Object(stdClass))
#3 /var/www/vhosts/mydomnain/htdocs/modules/rest/controllers/rest.php(105): call_user_func(Array, Object(stdClass))
#4 [internal function]: Rest_Controller->__call('item', Array)
#5 /var/www/vhosts/mydomnain/htdocs/system/core/Kohana.php(331): ReflectionMethod->invokeArgs(Object(Rest_Controller), Array)
#6 [internal function]: Kohana_Core::instance(NULL)
#7 /var/www/vhosts/mydomnain/htdocs/system/core/Event.php(208): call_user_func_array(Array, Array)
#8 /var/www/vhosts/mydomnain/htdocs/application/Bootstrap.php(67): Event_Core::run('system.execute')
#9 /var/www/vhosts/mydomnain/htdocs/index.php(113): require('/var/www/vhosts...')
it is caused by the post() method in modules/gallery/helpers/item_rest.php which checks for the "edit" permission. But i think it must check for the "add" permission, which fixed the issue for me.
My users have the right to add photos to albums, but not to edit them so i ran into this issue.
Can anyone comment on this issue?
thanks, bye peter