# |
Jun 2nd 2010, 21:22 |
Lemon_BE |
without coding anything in your comments controller |
# |
Jun 2nd 2010, 21:22 |
Lemon_BE |
for example if you make the "created" a slot, then you can add cool rules like, a user can only edit their own comment 5 mins long |
# |
Jun 2nd 2010, 21:22 |
savant |
best docs ever |
# |
Jun 2nd 2010, 21:22 |
savant |
php docs make up for the fact that its a crappy language |
# |
Jun 2nd 2010, 21:22 |
savant |
aaroninfidel: php.net/json_decode ! |
# |
Jun 2nd 2010, 21:22 |
Lemon_BE |
which you can use in your security graph |
# |
Jun 2nd 2010, 21:22 |
savant |
Lemon_BE: also a bit of a pain in the ass lol |
# |
Jun 2nd 2010, 21:22 |
Lemon_BE |
each "access object" will have slots |
# |
Jun 2nd 2010, 21:22 |
aaroninfidel |
savant: alright sorry. |
# |
Jun 2nd 2010, 21:22 |
savant |
Lemon_BE: sounds like ACL |
# |
Jun 2nd 2010, 21:21 |
Lemon_BE |
the only problem is going to be the number of queries |
# |
Jun 2nd 2010, 21:21 |
savant |
aaroninfidel: thats decoding json into whatever is appropriate. read the php documentation on it, thats a native php function |
# |
Jun 2nd 2010, 21:21 |
Lemon_BE |
and it can have as much branches as you want |
# |
Jun 2nd 2010, 21:21 |
Lemon_BE |
were the roots are the object's actions |
# |
Jun 2nd 2010, 21:21 |
Lemon_BE |
well my LSM will have a nice "security graph" |
# |
Jun 2nd 2010, 21:21 |
aaroninfidel |
is it turning it into an array? |
# |
Jun 2nd 2010, 21:21 |
aaroninfidel |
well, when I am doing json_decode what exactly is happening? |
# |
Jun 2nd 2010, 21:20 |
savant |
but its your choice |
# |
Jun 2nd 2010, 21:20 |
savant |
the latter gives php arrays |
# |
Jun 2nd 2010, 21:20 |
savant |
aaroninfidel: well thats a php question. probably either simplexml_load_string or the CakePHP XML class |
# |
Jun 2nd 2010, 21:19 |
Lemon_BE |
check that out thx |
# |
Jun 2nd 2010, 21:19 |
aaroninfidel |
savant: well in the example they're using json_decode because the results returning are .json if I'm using a rest API with xml results what would I use as an equivalent? |
# |
Jun 2nd 2010, 21:19 |
savant |
Lemon_BE: http://github.com/jnunemaker/canable |
# |
Jun 2nd 2010, 21:19 |
savant |
Lemon_BE: that sounds difficult |
# |
Jun 2nd 2010, 21:19 |
Lemon_BE |
its based on "real world" rules |
# |
Jun 2nd 2010, 21:19 |
savant |
aaroninfidel: maybe. i didn't write it |
# |
Jun 2nd 2010, 21:18 |
savant |
Lemon_BE: good luck implementing it |
# |
Jun 2nd 2010, 21:18 |
liaogz82 |
haha |
# |
Jun 2nd 2010, 21:18 |
liaogz82 |
ok then i shall play it save then |
# |
Jun 2nd 2010, 21:18 |
Lemon_BE |
i'm writing up the specs first |
# |
Jun 2nd 2010, 21:18 |
aaroninfidel |
savant: can I ask you more about that twitter datasource? |
# |
Jun 2nd 2010, 21:18 |
Lemon_BE |
no code yet |
# |
Jun 2nd 2010, 21:18 |
savant |
Lemon_BE: codez? |
# |
Jun 2nd 2010, 21:18 |
aaroninfidel |
savant: oh poop. :( |
# |
Jun 2nd 2010, 21:18 |
Lemon_BE |
) |
# |
Jun 2nd 2010, 21:18 |
Lemon_BE |
just add the linked rule |
# |
Jun 2nd 2010, 21:18 |
savant |
aaroninfidel: no I went away on a netsplit :( |
# |
Jun 2nd 2010, 21:18 |
Lemon_BE |
no need to do stuff in the news controller |
# |
Jun 2nd 2010, 21:18 |
savant |
liaogz82: it could, but it would be awkward |
# |
Jun 2nd 2010, 21:18 |
Lemon_BE |
for example allowed users with role 1 only post comments on a news item if the news item is only 1 week old |
# |
Jun 2nd 2010, 21:18 |
aaroninfidel |
savant: are you still around? |