[rt-users] How do I add a password to a Non-Privileged user?

Nick Barnes nick at bcn-it.co.uk
Tue Jul 1 07:14:16 EDT 2003


	 

From: Jesse Vincent [mailto:jesse at bestpractical.com] 
> Can you turn on database query logging and capture the 
> queries that the
> database performs after you click the "search" button for a 
> search that
> includes disabled users? That's the thing that's most likely to help
> track down the issue you're seeing.


OK. The following search was as follows:

Find people whose: 'USER ID' 'CONTAINS' '' and "Include disabled users
in search." is ticked.


---------------8<---------------

2 Query       SELECT  * FROM GroupMembers WHERE GroupId = '4' AND
MemberId = '12'

2 Query       SELECT ACL.id from ACL, Groups, Principals,
CachedGroupMembers WHERE  (ACL.RightName = 'SuperUser' OR  ACL.RightName
= 'AdminUsers') AND Principals.Disabled = 0 AND
CachedGroupMembers.Disabled = 0  AND Principals.id = Groups.id AND
Principals.id = CachedGroupMembers.GroupId AND
CachedGroupMembers.MemberId = '12' AND ( ACL.ObjectType = 'RT::System'
OR (ACL.ObjectType = 'RT::System' AND ACL.ObjectId = '1')) AND ( (
ACL.PrincipalId = Principals.id AND ACL.PrincipalType = 'Group' AND
(Groups.Domain = 'SystemInternal' OR Groups.Domain = 'UserDefined' OR
Groups.Domain = 'ACLEquivalence' OR Groups.Domain = 'Personal')) OR (
((Groups.Domain = 'RT::System-Role' AND Groups.Instance = '1')  )  AND
Groups.Type = ACL.PrincipalType AND Groups.Id = Principals.id AND
Principals.PrincipalType = 'Group')  )  LIMIT 1

2 Query       SELECT count(DISTINCT main.id) FROM Users main, Principals
Principals_1, CachedGroupMembers CachedGroupMembers_2  WHERE
((CachedGroupMembers_2.GroupId = '4')) AND ((Principals_1.PrincipalType
= 'User'))  AND main.id = Principals_1.id  AND Principals_1.id =
CachedGroupMembers_2.MemberId  

2 Query       SELECT DISTINCT main.* FROM Users main, Principals
Principals_1, CachedGroupMembers CachedGroupMembers_2  WHERE
((CachedGroupMembers_2.GroupId = '4')) AND ((Principals_1.Disabled =
'0')) AND ((Principals_1.PrincipalType = 'User'))  AND main.id =
Principals_1.id  AND Principals_1.id = CachedGroupMembers_2.MemberId
ORDER BY main.Name ASC

2 Query       SELECT
RELEASE_LOCK('Apache-Session-5fd5448a46f2a93ac787f13b87292bb6')

3 Query       SELECT  * FROM Users WHERE Name = 'RT_System'

3 Query       SELECT  * FROM Users WHERE Name = 'Nobody'

3 Query       SELECT
GET_LOCK('Apache-Session-5fd5448a46f2a93ac787f13b87292bb6', 3600)

3 Query       SELECT a_session FROM sessions WHERE id =
'5fd5448a46f2a93ac787f13b87292bb6'

3 Query       SELECT
RELEASE_LOCK('Apache-Session-5fd5448a46f2a93ac787f13b87292bb6')

---------------8<---------------


And the following log is for the query: 

Find people whose: 'EMAIL' 'CONTAINS' 'b'  and "Include disabled users
in search." is ticked.

(I know there should be some in there!)


---------------8<---------------

5 Query       SELECT  * FROM Users WHERE Name = 'RT_System'

5 Query       SELECT  * FROM Users WHERE Name = 'Nobody'

5 Query       SELECT
GET_LOCK('Apache-Session-5fd5448a46f2a93ac787f13b87292bb6', 3600)

5 Query       SELECT a_session FROM sessions WHERE id =
'5fd5448a46f2a93ac787f13b87292bb6'

5 Query       SELECT  * FROM Groups WHERE Type = 'Privileged' AND
Instance = '' AND Domain = 'SystemInternal' AND Name = ''

5 Query       SELECT  * FROM GroupMembers WHERE GroupId = '4' AND
MemberId = '12'

5 Query       SELECT ACL.id from ACL, Groups, Principals,
CachedGroupMembers WHERE  (ACL.RightName = 'SuperUser' OR  ACL.RightName
= 'AdminUsers') AND Principals.Disabled = 0 AND
CachedGroupMembers.Disabled = 0  AND Principals.id = Groups.id AND
Principals.id = CachedGroupMembers.GroupId AND
CachedGroupMembers.MemberId = '12' AND ( ACL.ObjectType = 'RT::System'
OR (ACL.ObjectType = 'RT::System' AND ACL.ObjectId = '1')) AND ( (
ACL.PrincipalId = Principals.id AND ACL.PrincipalType = 'Group' AND
(Groups.Domain = 'SystemInternal' OR Groups.Domain = 'UserDefined' OR
Groups.Domain = 'ACLEquivalence' OR Groups.Domain = 'Personal')) OR (
((Groups.Domain = 'RT::System-Role' AND Groups.Instance = '1')  )  AND
Groups.Type = ACL.PrincipalType AND Groups.Id = Principals.id AND
Principals.PrincipalType = 'Group')  )  LIMIT 1

5 Query       SELECT count(DISTINCT main.id) FROM Users main, Principals
Principals_1, CachedGroupMembers CachedGroupMembers_2  WHERE
((CachedGroupMembers_2.GroupId = '4')) AND ((Principals_1.PrincipalType
= 'User'))  AND main.id = Principals_1.id  AND Principals_1.id =
CachedGroupMembers_2.MemberId  

5 Query       SELECT DISTINCT main.* FROM Users main, Principals
Principals_1, CachedGroupMembers CachedGroupMembers_2  WHERE
((CachedGroupMembers_2.GroupId = '4')) AND ((Principals_1.Disabled =
'0')) AND ((Principals_1.PrincipalType = 'User'))  AND main.id =
Principals_1.id  AND Principals_1.id = CachedGroupMembers_2.MemberId
ORDER BY main.Name ASC

5 Query       SELECT
RELEASE_LOCK('Apache-Session-5fd5448a46f2a93ac787f13b87292bb6')

8 Connect     rt_user at localhost on rt3

8 Query       SELECT  * FROM Users WHERE Name = 'RT_System'

8 Query       SELECT  * FROM Users WHERE Name = 'Nobody'

8 Query       SELECT
GET_LOCK('Apache-Session-5fd5448a46f2a93ac787f13b87292bb6', 3600)

8 Query       SELECT a_session FROM sessions WHERE id =
'5fd5448a46f2a93ac787f13b87292bb6'

8 Query       SELECT
RELEASE_LOCK('Apache-Session-5fd5448a46f2a93ac787f13b87292bb6')

---------------8<---------------

I'm not even going to begin to speculate on what's going wrong!!

Cheers,

Nick.




More information about the rt-users mailing list