phalcon / incubator

Incubator adapters/functionality for the Phalcon PHP Framework
Other
731 stars 339 forks source link

ACL Adapters in 3.0.x #558

Closed Jurigag closed 3 years ago

Jurigag commented 8 years ago

How about implementing https://github.com/phalcon/docs/blob/master/en/reference/acl.rst#function-based-access in acl adapters ?

Dont know how exactly it should be working - i guess serializing/unserializing function ? But default serialize/deserialize methods in php cant serialize Closures so we would need to add/implement some library which will allow us such a thing.

There are some code for serializing/deserializing closures in php : http://www.htmlist.com/development/extending-php-5-3-closures-with-serialization-and-reflection/

That would need to implement additional class for ACL Functions i guess to make them serializable(they would be just objects).

@sergeyklay

uonick commented 8 years ago

@Jurigag https://github.com/phalcon/incubator/commit/0e81371e0db18a98d36b789bc9f19a4ab3be7001

Jurigag commented 8 years ago

@uonick

But it's only making them to work with 2.1.x, not actually implementing behaviour which have Phalcon\Acl\Adapter\Memory:

https://github.com/phalcon/cphalcon/blob/2.1.x/phalcon/acl/adapter/memory.zep#L676

sergeysviridenko commented 7 years ago

@Jurigag Could you give more information? https://github.com/phalcon/docs/blob/master/en/reference/acl.rst#function-based-access link is bad

sergeyklay commented 7 years ago

@sergeysviridenko The new URL is https://docs.phalconphp.com/en/3.2/acl#function-based-access

sergeysviridenko commented 7 years ago

@sergeyklay Thank you

emiliodeg commented 6 years ago

We can implement to serialize and unserialize closures with Super Closure