Restricting Public Access to Projects

Tuesday, July 03, 2007 by Dan Ostlund

Projects in FogBugz can be configured to allow public submissions through the web.  This is a very nice feature, but it has two potential drawbacks.  The first is that all public projects are visible to all visitors, and you may not want some people to know about the existence of a particular project for whatever reason.  The second is that anyone who comes to your site can submit cases.  This may be just fine, or even desirable, for most companies, but there may be a need to keep one project secret, and yet still grant access to a segment of your customers; or perhaps you simply want one project associated with a single url so you can send the people you want to the right url.

 

Luckily there is a simple way to get this done.  Let’s say you have 2 projects but you want a separate url for the public submission page for each project, so that there is only one project available on each page.  We’ll call your two projects “ray gun” and “spacesuit.”  To give ray gun its own page you should first make sure the project allows public submissions.  You do this by editing the ray gun project on the Projects page and choosing “Yes” for the “Allow public submissions” selection.  If you were to log out now and hit your FogBugz page you would see a line that says “Enter a new case.”  Selecting that would bring up the new case form with a list of all the publicly available projects. 

 

To get a page that just has the ray gun project as the project option in a new case, you will need to:

 

1)      View the page source (right click, view source in your browser) on the page after you have clicked the “new case” link. 

2)      Find the line that has the html tags for option and lists all of your public projects.

3)      Remove all the tags for the projects you do not want displayed and leave only those you do.

4)      Save that file with some name—I saved mine with the name raygun.html.

5)      Place that file in the FogBugz website directory,

 

You can then give out the url http://yourinstallation/raygun.html to send people directly to that page with ray gun as the only option.  You simply repeat the process for the spacesuit project and you can send users directly to the page you want.

 

Of course, if you then want to restrict who can go to that page you can control access with .htaccess or making changes to your web server’s security permissions.

 

In my next entry I’ll supply an example file that’s been stripped down that you might alter and use on your own site.

Categories: FogBugz
Tags: ,
Actions: E-mail | Permalink