Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [ZF][ZendFramework2] BjyAuthorize - błąd 403
netvalue
post 27.11.2014, 11:07:54
Post #1





Grupa: Zarejestrowani
Postów: 199
Pomógł: 2
Dołączył: 9.06.2008

Ostrzeżenie: (0%)
-----


cześć Wam !

mam problem z dostępem do jakiejkolwiek strony (nawet home) w app jako guest / user..
zrezygnowalem z Guard\Route chce pozostać tylko na Controller Guard..
wcześniej miałem równiez w konfigu Route i działałało dobrze ...

ponizej moj konfig

  1. <?php
  2.  
  3. return array(
  4. 'bjyauthorize' => array(
  5. 'default_role' => 'guest',
  6. 'identity_provider' => 'BjyAuthorize\Provider\Identity\ZfcUserZendDb',
  7. 'role_providers' => array(
  8. 'BjyAuthorize\Provider\Role\ZendDb' => array(
  9. 'table' => 'user_role',
  10. 'role_id_field' => 'role_id',
  11. 'parent_role_field' => 'parent_id',
  12. ),
  13. ),
  14.  
  15. 'guards' => array(
  16.  
  17.  
  18. // 'BjyAuthorize\Guard\Route' => array(),
  19.  
  20. 'BjyAuthorize\Guard\Controller' => array(
  21. // zfc user and index - everyone
  22. array('controller' => 'zfcuser', 'roles' => array('guest')),
  23. array('controller' => 'Application\Controller\Index', 'roles' => array('guest', 'user')),
  24. array('controller' => 'Catalog\Controller\Page', 'roles' => array('guest', 'user')),
  25. array('controller' => 'error', 'roles' => array('guest')),
  26.  
  27. array('controller' => 'ZfcAdmin\Controller\AdminController', 'roles' => array('admin')),
  28. array('controller' => 'zfcuseradmin', 'roles' => array('admin')),
  29. )
  30. ),
  31. ),
  32.  
  33. );
  34.  


ok znalazłem przyczynę. może się komuś przyda w przyszłości

jesli ktoś instaluje Zfcuser + ZfcAdmin + BjyAuthorize

to domyślnie w konfigu ZfcAdmin jest stworzona definicja "BjyAuthorize\Guard\Route" która powoduje ten problem i należy ją usunąć.

Ten post edytował netvalue 27.11.2014, 11:02:32
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 10:07