philiplb / CRUDlex

CRUDlex is an easy to use CRUD generator for Symfony 4 and Silex 2 which is great for auto generated admin pages
https://philiplb.de/crudlex/
MIT License
109 stars 23 forks source link

Feature Request: Random String as database id #36

Closed timfreiheit closed 8 years ago

timfreiheit commented 8 years ago

it would be useful to have the possibility to replace the auto incremented id with an random string. My current solution is to add an unique objectId field.

philiplb commented 8 years ago

@timfreiheit What is your specific use case?

timfreiheit commented 8 years ago

I have an api which modify an existing entry. But with an auto incremented id it is easy to guess the other existing ids. At this point there is no other validation with an session token possible. It is like the data model in parse. If you know the id you have the right to modify it.

philiplb commented 8 years ago

Can be easily added but you should think of a different solution than security by obscurity. The goto solution would be http://silex.sensiolabs.org/doc/providers/security.html and maybe add https://github.com/philiplb/CRUDlexUser .

philiplb commented 8 years ago

Implemented in 0ab7cd0f14adbf699f8a0537cbed8e30181121ef