[rt-users] Query about "Principals" table
elacour at easter-eggs.com
Tue Jun 22 04:22:07 EDT 2010
On Tue, Jun 22, 2010 at 10:04:40AM +0200, Alberto Villanueva wrote:
> A have a question about "Pincipals" table. If I run next query: "select
> * from Principals where ObjectId=26;". It returns a user (in my
> database). It's OK.
> If I run next query: "select count(id) from Tickets where Creator=26;",
> it returns the number of tickets which creator is user-id=26. And I
> haven't need to use "Principals" table.
> And I do a "join" query between "Users" and "Tickets", I can obtain the
> information without using "Principals" table.
> Then, what is "Principals" table used to? I don't understand that table.
> Any explanation?
principals are used to ease ACLs calculations, by giving a common list of
Users and Groups objects.
principals Id are unique across users and groups and users and groups
uses the principal id as Id. That's why, if you create a user A, then a
group B, then a user C, the id for user C isn't id of user A + 1.
More information about the rt-users