How do I get a list of all of the folder permissions for a given user. This may eventually morph into a report where I can look at the permissions for each user in Vault.
Would it be easier to use the Vault API or create a stored procedure to read data directly from the database?
Thanks
Easy API Question
Moderator: SourceGear
Similar issue here:
http://support.sourcegear.com/viewtopic.php?p=16740
To get a report on what users' rights are run the following query:
SELECT u.login, s.* FROM sgvault.dbo.ufngetusersecurityrights( SOME_REP_ID, SOME_USER_ID, DEFAULT ) s,
sgvault.dbo.tblusers u WHERE (u.userid = SOME_USER_ID)
As for security rights, it the "sum" of the rights
1 = R (Read)
2 = C (Checkin)
4 = A (Admin)
So a "7" = 1 + 2 + 4
http://support.sourcegear.com/viewtopic.php?p=16740
To get a report on what users' rights are run the following query:
SELECT u.login, s.* FROM sgvault.dbo.ufngetusersecurityrights( SOME_REP_ID, SOME_USER_ID, DEFAULT ) s,
sgvault.dbo.tblusers u WHERE (u.userid = SOME_USER_ID)
As for security rights, it the "sum" of the rights
1 = R (Read)
2 = C (Checkin)
4 = A (Admin)
So a "7" = 1 + 2 + 4
Last edited by lbauer on Tue Jan 10, 2006 2:27 pm, edited 1 time in total.
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager
I find this post curious because over a year ago, I was told NOT TO run/create SQL against the vault database and that all use should be strictly left to the API (because the underlying structures could change and break your SQL, etc.). Anyway, I just find it odd that now sourcegear is saying it's okay. =)
montek:
We've never said querying the database was against the rules. For reporting purposes, one of the nice things about Vault is you can gain access to all sorts of information that may not be present in some other form. If you go through this forum, through the years, we've provided queries for people wanting to get additional information directly from the database.
Note, we have said and (still do say), do not MODIFY any data using stored procs or the tables themselves. The Vault server is more than a wrapper around the database, so data modifications need to originate from the Vault API.
We've never said querying the database was against the rules. For reporting purposes, one of the nice things about Vault is you can gain access to all sorts of information that may not be present in some other form. If you go through this forum, through the years, we've provided queries for people wanting to get additional information directly from the database.
Note, we have said and (still do say), do not MODIFY any data using stored procs or the tables themselves. The Vault server is more than a wrapper around the database, so data modifications need to originate from the Vault API.
Jeff Clausius
SourceGear
SourceGear