search cancel

[gtrep_security_group] Admin groups have sg_admin='N' and 'Y'

book

Article ID: 144830

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

I was working on creating a tile in project where if the current login user is in the admin group it controls the project drop-down list for some custom functionality for reporting on Find and Reserve.
So they would all be testers but within the Tile the list of projects they see would only be where they are member of group  sg_admin=Y. 
Is this due to project being created in Datamaker?
I don't know how each was created.
Is there another join I can use that is more consistent?

SELECT    [sg_admin], count(*)   
  FROM [gtrep].[dbo].[gtrep_security_group] where sg_name like 'Admin%'  
  group by sg_admin
gives me 20 N and 16 Y
Real SQL is below
SELECT distinct    PROJ_NAME 
  FROM [gtrep].[dbo].[gtrep_security_ldap_group] GSLG
  inner join [dbo].[gtrep_security_groupldap_g]  GSGLG on GSGLG.[sglg_slg_id] = GSLG.[slg_id]
  inner join [dbo].[gtrep_security_group] GSG on GSGLG.sglg_sg_id = GSG.sg_id
  inner join [dbo].[gtrep_security_usergroup] GSUG on GSUG.[sug_sg_id]= GSGLG.sglg_sg_id
  inner join [dbo].[gtrep_security_user] GSU on GSUG.sug_su_id = GSU.su_id
  inner join dbo.gtrep_project GP on GSG.[sg_proj_id] = GP.proj_id
   inner join dbo.findandreservemodels FARM on farm.Projectname = GP.proj_name  /* 
   and GP.proj_id = farm.Project
  where    /* [sg_admin]='Y' and */ SU_NAME  ='sina2ee' 

Environment

Test Data Manager
TDM Portal

Resolution

The sg_admin column is set to 'Y' (= is administrator group) if this group was granted all functions ("Select All Functions" is checked in the group details).
It doesn't have relation to group name or how the group was created - it's possible to create group "Users" with sg_admin equals to 'Y' or group "Admins" with sg_admin equals to 'N'.