I have written a custom query which shows who has access to what repository in Vault.
For some unknow reason to me, a few users are showing 2 lines for the same repository.
I have launched the Admin tool but can't seem to figure out why its doing this.
User Repo R C A
Motakef Extranet Y N N
Extranet Y Y Y
Canyou tell me how I can fix this.
Here is my SQL
USE sgvault
SELECT DISTINCT
sgmaster..users.name,
tblrepositories.name AS Repository,
CASE WHEN tblsecurityassignments.securityrights = 1
OR tblsecurityassignments.securityrights = 3
OR tblsecurityassignments.securityrights = 7 THEN 'Y' ELSE 'N' END AS ReadRights, CASE WHEN tblsecurityassignments.securityrights = 3
OR tblsecurityassignments.securityrights = 7 THEN 'Y' ELSE 'N' END AS CheckOutInRights,
CASE WHEN tblsecurityassignments.securityrights = 7 THEN 'Y' ELSE 'N' END AS AddRemoveDeleteRights
FROM
tblsecurityassignments
INNER JOIN sgmaster..users ON tblsecurityassignments.userid = sgmaster..users.userid
INNER JOIN tblrepositories ON tblsecurityassignments.repid = tblrepositories.repid
WHERE sgmaster..users.active = 1 AND (tblsecurityassignments.securityrights <> 0)
ORDER BY sgmaster..users.name, Repository
Duplicate Rows in Query
Moderator: SourceGear
Re: Duplicate Rows in Query
I figured it out. Someone went int Vault Admin tool and "Directly assigned" the user to a repository that he already had access to. This is why there were more than one line item for same user despite the Select DISTINCT clause.
THis issue is now closed.
THis issue is now closed.
Re: Duplicate Rows in Query
Thank you for providing an update.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support