[horde] Re: Using perms
j.huinink at wanadoo.nl
Fri Mar 28 02:51:28 PST 2003
First off: I'm not a core team member and I didn't develop any applications
from scratch. I submitted some patches to different things that got
commited, so the value of my comments could be limited.
That said: here we go.
> "Jeroen Huinink" <j.huinink at wanadoo.nl> wrote in
> news:b5vllq$thp$1 at main.gmane.org:
> > A Horde download manager is something that I would like to have as well.
> > Exactly what are you planning? Can I be of assistance?
> Well, I'm planning (and started today) something like a doenload manager.
> The requirements are as followed:
Yes, this is similar to what I would like to have.
> Hopefully, you can be of assistance :-) since I have no plan how to do
> I've already done the actual download list with summary, changelog view,
> adding an download, editing and deleting and making is read-only for
> non-admin users.
Where do you store the download list? Is this in a database? Where do you
store the documents? Do you use the VFS or are you only storing URLs? Does
every download require you to specify a summary and a changelog?
> My problem now is, that I have to add permissions (I already defined a
> in the db table) for each download transparently and not staticly (first,
> thought of looking in the already defined permissions for the user-group
> then simply hard-copy them to my db field - that wouldnt work, I think)
> so I have to start from scratch always looking at whups.
You are looking at Whups as an example application. I would pick another one
as an example, since Whups is one of the most complicated. What I think is
you could take a better look at Gollem, since this is a file manager you
might be able to use a lot of the stuff in there.
How I think this is supposed to work is: there is an AppDriver class. This
AppDriver would supply you with functions like
listDownloads, addDownload, changeDownload, etc.
The actual pages call the functions in this class to retrieve the list. You
probably do not need a DownloadFile class or something like that. The
downloads themselves can be represented as hashes inside an array. This
array would be what is returned by listDownloads.
> So I have to write a class like Whups_Driver ( I would call it
> Download_Driver ) which handles all db operations (never worked with
> PEAR::DB though ) and a second class like Whups (-> Download) which would
> the rest... but I have no idea hwo to handle my download list in a
> Some experience to C++ makes me think of a small class representing a
> download and attach a list of those to my Download class, but how do I
> handle permissions at that point?
Since I haven't actually worked with Permissions yet (I'm trying to get a
grip on this). How I think it works in Whups is that you create permissions
through the Perms class. The name of the permission identifies your object.
> As you see, I'm quite desperate, and I would appreciate you help :-))
> (Hoping you're still interested in the module I'm planning). Although
> developing this module is my job at the moment, I really would like to
> it to the official horde package in some future... as far as it is of
> What do you think?
> I hope I didnt shock you with all this...
No, you didn't. I hope the above info helped.
How it works:
More information about the horde