# |
Aug 7th 2008, 07:53 |
alkemann |
you should try to make behavior for it so it can be reused |
# |
Aug 7th 2008, 07:53 |
alkemann |
i look forward to seein how it turns out :) |
# |
Aug 7th 2008, 07:53 |
lqdice__ |
alkemann: this will def be interesting |
# |
Aug 7th 2008, 07:53 |
alkemann |
can even do it in view |
# |
Aug 7th 2008, 07:52 |
lqdice__ |
Ins|de: you should be able to do it in app_controller beforeFilter |
# |
Aug 7th 2008, 07:52 |
alkemann |
lqdice__: not that i recall atm |
# |
Aug 7th 2008, 07:52 |
Ins|de |
hi there, i could change layout files with $this->layout variable right? can i do it on app_controller or just on the extended controller? |
# |
Aug 7th 2008, 07:51 |
lqdice__ |
have you seen anyone do something like this before? |
# |
Aug 7th 2008, 07:51 |
lqdice__ |
basically |
# |
Aug 7th 2008, 07:51 |
lqdice__ |
the SQL will have to dig all the way to the leaf and if I have access to the leaf, give access to the parent |
# |
Aug 7th 2008, 07:51 |
alkemann |
it will be a little complicated, but should be doable |
# |
Aug 7th 2008, 07:50 |
lqdice__ |
well I also have to put conditions to make sure the user has access to it (which is the part im worried about) |
# |
Aug 7th 2008, 07:50 |
alkemann |
u do $tree = $this->Folder->find('threaded'); $folder = $this->Folder->find($id); the first with recursive -1 and the second with 1 |
# |
Aug 7th 2008, 07:49 |
alkemann |
yes |
# |
Aug 7th 2008, 07:49 |
lqdice__ |
which method.. folder actsAs Tree, folder hasMany Files ? |
# |
Aug 7th 2008, 07:49 |
alkemann |
the good thing about this last method is you can easily only show files for one folder at a time, but show the entire folder structure (like windows) |
# |
Aug 7th 2008, 07:49 |
lqdice__ |
so if I am in /SomeProgram and it has 30 folders w/ 30 files each but the user only has access to 1 file.. it should only show that 1 folder |
# |
Aug 7th 2008, 07:48 |
lqdice__ |
yes |
# |
Aug 7th 2008, 07:48 |
lqdice__ |
or rather . i just want to get the children of a node.. is that easy enough? so if they are at /SomeProgram folder i just want to show its children |
# |
Aug 7th 2008, 07:48 |
alkemann |
only have rights on files, only show folders where user has files with read rights ? |
# |
Aug 7th 2008, 07:48 |
sokar007 |
hi, in cakephp manual http://book.cakephp.org/view/303/file-fields $this->data['Documents']['submittedfile'] is array with few few fields. i tried it and i have only filename - why ? |
# |
Aug 7th 2008, 07:47 |
lqdice__ |
alkemann: do you think w/ this method it will be easy enough to enumerate the entire tree to display? |
# |
Aug 7th 2008, 07:47 |
alkemann |
or u can have Folder actsAs Tree, Folder hasMany Files and Files actsAs Ordered (my behavior) |
# |
Aug 7th 2008, 07:46 |
alkemann |
lqdice__: thats what i mean Node actsAs Tree and have 2 behaviors for the node for file vs folder |
# |
Aug 7th 2008, 07:46 |
lqdice__ |
i mean .. nodes hasmany nodes VS tree behaviour |
# |
Aug 7th 2008, 07:45 |
alkemann |
better than folders hasmany folders and folders hasMany files imho |
# |
Aug 7th 2008, 07:45 |
lqdice__ |
thats why i was thinking tree behaviour might be better |
# |
Aug 7th 2008, 07:45 |
lqdice__ |
thats not a big deal im not worried about that.. im just wondering if doing node hasMany nodes is too heavy |
# |
Aug 7th 2008, 07:45 |
alkemann |
model* |
# |
Aug 7th 2008, 07:45 |
alkemann |
1 mode |
# |
Aug 7th 2008, 07:45 |
lqdice__ |
one if you click it d/l's the other just opens it up |
# |
Aug 7th 2008, 07:45 |
alkemann |
2 behaviors |
# |
Aug 7th 2008, 07:44 |
lqdice__ |
alkemann: they have different meta data though |
# |
Aug 7th 2008, 07:44 |
lqdice__ |
alkemann: he has access to the Programs folder.. but he will only see the /SomeProgram/Version 2.0/Windows_Install.exe in his tree |
# |
Aug 7th 2008, 07:44 |
alkemann |
Node hasMany Node . and a node can be a file or a folder (or even both) |
# |
Aug 7th 2008, 07:44 |
alkemann |
lqdice__: dont differentiate between files and folders |
# |
Aug 7th 2008, 07:43 |
alkemann |
so if a user only have acces to that file, he doesnt have access to the /programs folder and shouldnt even know it exists (imho) |
# |
Aug 7th 2008, 07:43 |
lqdice__ |
what I could possibly do is just have a Folder hasMany Folders and hasMany Files |
# |
Aug 7th 2008, 07:43 |
lqdice__ |
thats why i didnt think ACL would be right for this |
# |
Aug 7th 2008, 07:43 |
lqdice__ |
right |
# |
Aug 7th 2008, 07:43 |
alkemann |
and the way it works if you only have access to a leaf, you dont have access to the root |