Friday, December 19, 2008

Subversion Authorization

This is probably obvious to others, but took some figuring out for me...

We're using subversion with the svn+ssh protocol, and we need to setup a new repository which only certain users will have access to.

After reading through the manual, it seemed that I needed to configure the conf/svnserve.conf file to use a users file, and then setup the allowed users there.

Well, finally it turns out that because we're tunneling our svn, it's really just controlled by the file permissions. Since our server's hosted on linux, I:
  • Created a new group [sudo addgroup restricted]
  • Added the appropriate users to that new group
  • Set the owner on the svn repository directory [sudo chown -R svn.restricted /path/to/repository]
  • Set the file permissions on the svn repository directory [sudo chmod -R o-rwx /path/to/repository]
All good!

Thursday, December 4, 2008

I Love IntelliJ

I had some hex values for colors, e.g.:
Color c = new Color( 0xcc33cc );
What I really needed, though, was to have the colors broken out into their constituent, base-10, parts. 

Ctrl+Enter on the "Color(" brings up a context menu, "Choose Color". Up comes a dialog box. Hmmm... Click on the RGB tab (alt+G), click OK (hit enter), and voila! I've got what I need:
new Color( 204, 51, 204 )
Yeah... I love IJ :-)