Control access to source code

It's a good idea to make sure your source code can only be used by people who have business with it.

You can control which users can view or commit source code. You can make these distinctions at the repository level or at the path level within a repository.
  1. Click PROJECT ADMIN from the Project Home menu.
  2. On the Project Settings page, click Permissions.
  3. Click the role whose access to source code you want to control.
    Tip: If the appropriate role does not exist, you must create it first. See Create a role.
  4. On the Edit Role page, click Source Code.
  5. Under Permissions for Specific Repositories, select a repository in the project and specify this role's access to the repository as a whole.
    • To block users with this role from seeing this repository at all, select No Access.
    • To allow users with this role to see everything in the repository but not commit to it, select View Only.
    • To allow users with this role to commit to any path in the repository, select View and Commit.
  6. If you want to control access to a specific path within the repository for users with this role, select Path-based Permissions.

    See Who can access source code? and Wildcard-based access control and path-based permissions in TeamForge for more information.

    1. Click Add.
    2. Specify a path in the repository.
      Tip: The path does not have to exist when you specify it. You can set a permission for a path that may be created later.
    3. Select No Access, View Only, or View and Commit for this path.
    • If none of the available permissions (View Only, View and Commit, or Path-based Permissions) is selected for any repository, and none of the options under Source Code Permissions is selected, users with this role do not see the Source Code toolbar button.
    • If two paths have different permissions, the permissions on the lower-level path take effect. For example, consider a role that has "No Access" set for the path /branches/version3/users, but has "View and Commit" access to /branches/version3/users/vijay. Users with this role can:
      • Check code in and out of the vijay directory.
      • Click down through all the directories in that path, including users.

      Users with this role cannot check files in and out of the users directory or monitor commits to users.

  7. Click Save.
Note: You can also restrict the information that goes out with commit notification emails. See Who can access source code?.