Forum OpenACS Development: Re: Joining to acs_objects and package-aware packages

Collapse
Posted by Ola Hansson on
Joel,

I will give it a shot and try to answer your three points above.

- The id of the user, or prehaps better, the party that owns the note should be recorded in a "owner_id" column in the notes table if you want to be able to change the assigned user. OTOH, if ownership doesn't ever need to be passed to anyone else but the user who created the note, it is probably okay to just join against acs_objects if you need to show that information.

- What you create is a "privilege". It's not entirely clear to me what the distinction between a privilege and a permission is ... I would like to express it as: "You grant the permission to exercise privilege X on object Y to party Z." However, that may be a bad interpretation and is certainly beside the point ...

The /permissions/ page is one place you can grant permissions. You may also do it directly from PL[PG]SQL when you create an object, for instance. Just use "acs_permission__grant_permission".

- An example of denormalization would be if one (as Barry proposes) would move the "object_type" column out of the acs_objects table and maintain the various object_types in a separate table (coincidentally such a table already exists) with (say) object_type_id as primary key. The removed column would be replaced by a "object_type_id" column pointing to the separate table.

At least this is my understanding of "denormalization". Someone please correct me if I'm wrong.

/Ola