Assigning Access rights on a file in VSS - visual-sourcesafe

how can i assign modify rights on the a file on VSS to a particular user in a team and the rest of team have ready only rights.
For Example, there are 4 users in the VSS and I want that one user should only be edit a particular file and the others 3 user should only be view that file, can't not edit it.
Thanks in Advance
Hussain

Access control is not that granular in VSS. You can assign particular rights by folder, but not by file. To control the rights by folder open up the Administrator tool, click on a user and select Tools | Rights by project. I suppose you could place a file in a particular folder to accomplish what you want, but that is about the best you can do.
By the way, mainstream support of VSS will end in 2011. It might be a good time to begin moving to an alternate solution. VSS is considered to be the lowest of low in the source control area anyway so any option will be better than VSS.

Related

Can admin create files manually within C:\inetpub\wwwroot under Windows 8.1?

Is it possible for someone with Administrator access to easily create arbitrary files (e.g. text documents) within the C:\Inetpub\wwwroot folder under Windows 8.1?
Normally right-click presents me with many file types I can create; here, I'm only given the option to create a new sub-folder, even though I can (i) edit existing files there or (ii) create files elsewhere and move them there. (Also, gvim running with administrator access can't create a (new) swap file there).
I created a subfolder ("test"), and took ownership of it, but it made no difference. One of my colleagues thought that this was a "special case" overridden by IIS and could be configured by the Group Policy Editor somehow?
I've heard that disabling UAC solves the problem, but I don't want to do that!
Any ways round this? (Reference to an existing discussion I missed would be fine if it covers the same problem). Thanks!
Smychi
Solved this; I added the specific administrative user account I was logged in under ("User") to the list of permissions and granted myself "Full Control".
Not sure why this didn't already work with the existing groups settings, though I'll admit my knowledge of Windows permissions isn't as good as it should be.
Feel free to say whether this is a good or bad way to do it, or add any comment to this anyway, for my benefit or for others who might stumble across this.
Smychi

Oracle/TOAD/Team Coding: Can't select a TFS Namespace when attempting to connect to TFS through TOAD

We are currently attempting to evaluate whether or not we want to use TOAD's Team Coding feature as it would seamlessly allow us to use TFS as a repository for our database objects. We currently have the newest version of TOAD (It is a TRIAL VERSION) sitting on a VM somewhere. The Team Coding feature is installed, and I can browse my TFS projects. What I can't do, however, is connect to TFS through the Logon in TOAD because it won't allow me to click 'OK' when I am attempting to select a namespace.
It was my understanding that the trial had been fixed to allow for this to happen. I couldn't find anything on their website, so I was curious if anyone knew the answer as to why I can't do this.
This only applies to Toad for Oracle.
You should be able to Log in to TFS with the Trial Version. If you can browse TFS Projects in Toad, you should be already logged in to TFS correctly.
The most likely reason that the button is disabled, is that you are attempting to logon to a remote workspace. I am assuming you can see your local WorkSpaces (Namespaces ?) in the Logon Window. Does the word (Remote) appear in parentheses next to the workspace name. If this is the case, then you are selecting a remote workspace. This workspace was set up for a different machine.
You will need to select or set up a workspace that was created for this machine. The quickest way to test this is to select 'New' from the workspace selection and create a new workspace mapped to a local folder (you can always delete later). Then you should be able to log in to TFS.
Hope this helps
P.S
We do not typically monitor postings on StackOverflow, so if you might want hop on over to the Toad Yahoo Groups with any follow up questions

Is working together possible when using Team Foundation Server?

If one chooses to "prevent other users from checking out and checking in" from Team Foundation Server:
Can anyone reach the code?
Is there any way to work from another user's computer?
How about shelving?
I would interpret that sort of lock as meaning that someone is going to do something so destructive that it is in your interests to not have an edited copy when that happens. If you think it is a mistake, talk to the person who locked the file.
An option, if you really want to do this, is to remove the readonly attribute on the file yourself (in Windows Explorer or through a shell) and edit the file. That is a good way to cause yourself trouble, though, if the file is going to be changed substantially by the person that locked it. Also, you will need to later mark it as checked out in TFS to actually check it in.
I do not think you will be able to shelve the file (unless you follow the option below) since you will not be able to check it out for edit.
One last option is that you could branch the file, work on the branch, and then merge it back in later. Once again, though, that may be difficult if the edits by the person locking the file are going to be extensive.
I'm not sure I understood all of your questions, but I'll give it a chance:
If by reach you mean, get latest version and read, yes they could. But they wouldn't be able to change the code while it's locked unless they circumvent Visual Studio and change the read-only attribute of the with the command-prompt, Windows Explorer etc.
Visual Studio and TFS 2010 introduces the concept of permissions on workspaces. A workspace now can be private (the old behavior), public limited or public. Using a public workspace, on could edit the files in the workspace of another person. See tf workspace /permission for more information.
You can shelve anything that is in your workspace regardless of locks on anybody's workspaces.
Here is a link to the permission values for TFS
http://msdn.microsoft.com/en-us/library/ms252587.aspx
This should answer your questions

Where should a WinForm app keep its logs?

I am working on a WinForm application, that allows working to work with "projects" (think about the application as Visual Studio, and projects as VS Solutions).
My question is - where should the application keep its logging files?
Some requirements include:
the application might not be running as an administrator (so saving in the %ProgramFiles% installation folder is not a good option)
The logs should be accessible to end-users (either for review, or for sending to the support team). (This means that hard to find folders, like %AppData%\Company\Application\Version\ProjectName... are not a good solution either)
The application might generate logs even when there are no open projects (so saving the logs in the project's folder is good only when there's a project, but not a final solution).
I was thinking of creating a "working folder" when the application is installed - something along the lines of C:\Application\, and then save the logs in a subfolder, like %WorkingFolder%\Logs\ProjectName
Thanks for the input.
Somewhere in the user's directory is actually the correct place to store them if they are specific to the current running user.
Some programs create folders at the top level of the User's directory, next to Documents and Desktop, others do it in Documents.
Creating it in C:\ might cause issues if the user doesn't have write access to the root directory. You can pretty much guarantee the user will have write access to the Home directory.
The other option is to look for an environment variable, and if its set use the value as the location, if not default to the User's home directory.
If the logs are user only you should store them at %AppData%\Company\Application Name.
If the logs are shared (any user can see any log) you should store them at:
%ProgramData%\Company\Application Name (for Vista+)
or
%AllUsersProfile%\Application Data\Company\Application Name (for XP-)
As for user access, you can add a shortcut to the start menu to the appropriate location or have a link within the program.
Another option in Vista+ is the Public folder (%Public%) which has links throughout Explorer for easy access to.
Where should I write program data instead of Program Files is a good blog entry by Chris Jackson from Microsoft. While it isn't an "official stance" it holds some excellent information.
You can always ask the user to configure this. Set a default path, maybe the application directory. During installation or while setting up the application you may prompt the user to input the path they want to use for logs. That's fair, right. If they're advanced enough to use logs they're good enough to configure a path too.
What do you plan to do with the logs. Are they technical, of for financial/security audits?
The EventLog is a nice place for technical logs, because you can access it remotely (within the Domain) and it is cleaned up automatically.
The %AppData% is also a good place for technical logs, specially if you are unable to connect to the eventlog. You can find the log files, and you can direct the end-user to them, but they are not "in the face" of the end-user. You can include a "send log to the maker" button to receive them.
For logs that needs be accessed by end-users, the My Documents (or a subfolder) looks good.
You can just to add button / menu item to easy open folder with logs.
Best place fo logs are %AppData%\AppName or %temp%\AppName.
Never use %MyDocs% or %Program Files%.
I'd suggest adding that question to the installer so that the user that installs the software can decide where best to put the logs. Though C:\[AppName\ sounds like a reasonable default for your requirements.
Edit: Just thought off, it would probably be worth warning the user if the select a bad location (in Program Files or in the root of the system drive etc) and if they choose to create a new directory, automatically give that directory correct permissions during the installation.
I think %APPDATA%\YourCompanyName\YourAppName is the preferred location. To overcome your stated objection of this location being hard to find, you could pretty easily and quickly implement a simple support screen in your app to allow the end user the ability to access and email these logs without too much trouble, so that the user will not have to remember or manually navigate to the long path name to get to the logs.
I don't really like the idea of the user being able to set this location via the installer because of possible naming and permission issues.
If the app needs to maintain the log only for the users current logged in timespan, then you could keep it in c:/temp.
Most of my winapps, i leave it there, so automatically it gets deleted once the user logs off..
Ofcourse, this primarily depends on your requirement.

Impersonate another user in Visual SourceSafe

We had an employee leave the company, and they left some files checked out in our VSS database. What is the best way to impersonate that user, so I can release those files?
Within ssadmin you can reset their VSS password (so that you know what their VSS password is, so that you can then log in as them using their password).
You could try logging in as an admin and undoing their checkout. You'd lose any work they did locally but if you only care about releasing the file lock it doesn't matter.
The admin can undo the checkout.

Resources