Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 18 13:52

    basz on develop

    make config ready for zend-expr… make config ready for zend-expr… fix coverage tests config and 1 more (compare)

  • Jun 18 13:52
    basz closed #390
  • Jun 18 13:33
    svycka commented #390
  • May 17 08:51
    svycka synchronize #390
  • May 17 08:38
    basz commented #390
  • May 17 08:31
    svycka commented #390
  • May 17 08:31
    svycka commented #390
  • May 17 08:26
    svycka synchronize #390
  • May 17 08:20
    svycka synchronize #390
  • May 17 08:18
  • May 17 08:17
  • May 17 08:17
    svycka synchronize #390
  • May 17 08:15
    svycka opened #390
  • May 14 06:30
    svycka closed #387
  • May 13 14:05

    prolic on develop

    changed types from array to ite… update phpunit update phpunit to supported ver… and 2 more (compare)

  • May 13 14:05
    prolic closed #388
  • May 13 09:36
    svycka commented #388
  • Mar 08 06:57
    svycka closed #386
  • Mar 06 16:38
    imonteiro commented #389
  • Mar 06 07:25
    svycka commented #389
Bas Kamer
@basz
Thanks sir! Mission completed.
Vytautas Stankus
@svycka
thanks @basz @prolic gitter somehow sent me mention notification :D
Vytautas Stankus
@svycka
what about #320?
Vytautas Stankus
@svycka
also what do you think about this old suggestion https://github.com/ZF-Commons/zfc-rbac/pull/320#issuecomment-257138222
Bas Kamer
@basz
@svycka just in time for your :beer: got warm I hope... ;-) I think I addressed the mentioned concerns from #320 into #379. So it should be trivial enough to apply the same to #320. Personally I don't have the time to move it forward, but it is on -the list-.
Vytautas Stankus
@svycka
I think maybe if 3.0 will be released soon maybe we don't need to merge this to v2
Vytautas Stankus
@svycka
and I a bit thought about plugin managers and I think it would be good idea to introduce new interfaces like AssertionContainerInterface if we want to separate zf service manager otherwise its no point to not use FactoryInterface in factories as we still depend on zf service manager
Sascha-Oliver Prolic
@prolic
Are we only dependend on service manager? No other zend components? If so, decoupling would make totally sense
Vytautas Stankus
@svycka
I think we have service-manager and stdlib
and stdlib is only required because of ModuleOptions I think we could get ride of it too but don't know about this
Sascha-Oliver Prolic
@prolic
Ok, let's remive this and make it totally middlewarish?
Vytautas Stankus
@svycka
this is not related to middlewares or I dont get your point
Sascha-Oliver Prolic
@prolic
Ok forget about middleware for now, but if it's 100% framework agnostic, then why still ZF in the name? I want symfony guys to use it as well then.
Vytautas Stankus
@svycka
maybe because zf guys created it :D
also symfony guys already can use it even with zend-servicemanager
Sascha-Oliver Prolic
@prolic
However, a symfony bundle and docs on how to integrate in laravel would be nice
Vytautas Stankus
@svycka
I guess that could be separate projects with related autoloading and everyting they need
Sascha-Oliver Prolic
@prolic
Maybe
Vytautas Stankus
@svycka
but that is possible now. no?
Bas Kamer
@basz
isn't the plugin manager a zend-servicemanager thing? thus only usable with
AssertionContainerInterface would be get($name, $options)?
Vytautas Stankus
@svycka
yes but if we only need that could be implemented with anything
Bas Kamer
@basz
you mean: "want to be able to?"
Vytautas Stankus
@svycka
we don't use options for assertions
Sascha-Oliver Prolic
@prolic
Mh, in this case we could think about dropping this additional container, just use default container instead
Vytautas Stankus
@svycka
yep be able to because this is only thing that we need from service manager
@prolic I thought that to but we need return type AssertionInterface
Bas Kamer
@basz
I'm not against it, anything more frameowrk agnostic is good in my opinion. Even when I personally only use zend-servicemanager as DI implementation.
Vytautas Stankus
@svycka
@basz me too :)
Bas Kamer
@basz
I though about doing that also, but didn't realize, the plugin manager never gets feeded options...
So I just left it for now.
Sascha-Oliver Prolic
@prolic
Simply check given return type and throw if needed
Vytautas Stankus
@svycka
also just sow something strange we can have only one role provider? then why we need RoleProviderPluginManager?
Vytautas Stankus
@svycka
and https://github.com/ZF-Commons/zfc-rbac/blob/develop/src/Container/ObjectRepositoryRoleProviderFactory.php is not psr-11 compatible $requestedName, ?array $options = [] is servicemanager thing
Bas Kamer
@basz
awsome! Is v2 capable of more then one provider? I guess it could be useful to have multiple providers, but not a necessity. I certainly havent used more then one ever
Vytautas Stankus
@svycka
I will try to limit it to one because even docs says: Roles can come from any sources: in memory, from a file, from a database... However, please note that since ZfcRbac
2.0, you can specify only one role provider per application. The reason is that having multiple role providers make
the workflow harder and can lead to security problems that are very hard to spot.
Bas Kamer
@basz
Then I would say we need no plugin manager...
Vytautas Stankus
@svycka
I will update my PR with this
Bas Kamer
@basz
:thumbsup:
Vytautas Stankus
@svycka
But I guess this will be tomorrow.
Vytautas Stankus
@svycka
ok started removing can you check if I dont do something stupid? I will continue tomorrow
Brendan Nash
@brendanjnash_twitter
Hi all - I need some direction on testing a route which is access controlled by rbac. I am not quite sure how to authorize the test to access the route...
Sascha-Oliver Prolic
@prolic
simply mock it and always allow
Brendan Nash
@brendanjnash_twitter
ok - Yeah, I was not 100% sure what to mock and how to implement it. I posted this on SO https://stackoverflow.com/questions/54029276/how-do-i-use-phpunit-to-test-a-controller-under-zfr-rbac (Hopefully if I can work it out it can stand as a resource for others)
Brendan Nash
@brendanjnash_twitter
@prolic Been playing with this today. I tried to mock it but I keep getting "you are not authorized to access this resource". Essentially I am trying this: $this->guard = $this->createMock(AbstractGuard::class);
$this->guard->method('onResult')->willReturn(true);
$this->dispatch('/cp/overview');
$this->assertResponseStatusCode(200);
Sascha-Oliver Prolic
@prolic
I assume your mocked guard is not used
This might help: ZF-Commons/zfc-rbac#334
Brendan Nash
@brendanjnash_twitter
Yes, that helped, a lot. Thank you!
Sascha-Oliver Prolic
@prolic
welcome