User Rights Query

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
btd
Posts: 324
Joined: Fri May 13, 2005 1:50 pm

User Rights Query

Post by btd » Wed Nov 21, 2012 2:01 pm

I am on Vault 5.1.
I have a query that iterates through the repos and returns back to me RCA for each user for each repo.
Good so far.

However, I see a duplicate row in the query results for a few entries and don't know how to track it down.
Here is my query for user 'build_server'
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 AND sgmaster..users.NAME = 'build_server' AND tblrepositories.name = 'Extranet'
ORDER BY sgmaster..users.name, Repository


and here are the results

build_server Extranet Y Y N
build_server Extranet Y Y Y

I traced back through all the repos in the UI and could not find a single case where Build_server has RCA to.

Can you help track this down for me via some SQL code?

Thanks

BTD

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: User Rights Query

Post by Beth » Wed Nov 21, 2012 3:27 pm

Could you send an email to support at sourcegear.com (attn: Beth) with a link to this forum thread?
Beth Kieler
SourceGear Technical Support

Post Reply