[horde] Re: Using perms

Jeroen Huinink j.huinink at wanadoo.nl
Fri Mar 28 02:56:31 PST 2003


Sorry, I pressed the wrong key, so my reply got sent before I finished it.

Here is where I intended to write some more:

> 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
do
> the rest... but I have no idea hwo to handle my download list in a
class...
> Some experience to C++ makes me think of a small class representing a
single
> 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.

Here I continue:

An example from whups:
$perm = &$perms->newPermission('whups:comments:' . $comment_id);

As I see it the permission doesn't get added to the object. A permission
refers to an object. So in order to check permission you use the object id
to retrieve a permission.

I hope I am correct here. Maybe somebody could confirm this?

> > What do you think?
> >
> > I hope I didnt shock you with all this...

No, you didn't. I hope the above info helped.

Regards,
Jeroen






More information about the horde mailing list