[Rt-commit] r5963 - in commitbit: . lib/CommitBit/Notification

jesse at bestpractical.com jesse at bestpractical.com
Sat Sep 16 20:28:45 EDT 2006


Author: jesse
Date: Sat Sep 16 20:28:44 2006
New Revision: 5963

Modified:
   commitbit/   (props changed)
   commitbit/lib/CommitBit/Model/Project.pm
   commitbit/lib/CommitBit/Model/Repository.pm
   commitbit/lib/CommitBit/Model/User.pm
   commitbit/lib/CommitBit/Notification/InviteToProject.pm

Log:
 r27595 at pinglin:  jesse | 2006-09-17 01:24:28 +0100
  * For now, don't worry about confirming email addresses


Modified: commitbit/lib/CommitBit/Model/Project.pm
==============================================================================
--- commitbit/lib/CommitBit/Model/Project.pm	(original)
+++ commitbit/lib/CommitBit/Model/Project.pm	Sat Sep 16 20:28:44 2006
@@ -88,7 +88,7 @@
     if (( $right eq 'update' or $right eq 'delete') and $self->is_project_admin($self->current_user)) {
         return 1;
     }
-    return 0;
+    $self->SUPER::current_user_can($right => @_);
 
 }
 

Modified: commitbit/lib/CommitBit/Model/Repository.pm
==============================================================================
--- commitbit/lib/CommitBit/Model/Repository.pm	(original)
+++ commitbit/lib/CommitBit/Model/Repository.pm	Sat Sep 16 20:28:44 2006
@@ -250,7 +250,7 @@
 auth-access = write
 password-db = passwd
 authz-db = authz
-# realm = My First Repository
+realm = @{[$self->name]}
 EOF
 
 	close $file or die $@;
@@ -261,8 +261,45 @@
 }
 sub write_httpd_config {
     my $self = shift;
-    with_write_lock { 
+    my $msg = $self->autogenerated_file_warning;
+ $msg .= <<"EOF";
+
+<Location /@{[$self->name]}>
+
+  # Uncomment this to enable the repository,
+  DAV svn
+
+  # Set this to the path to your repository
+  SVNPath @{[$self->local_path]}
+
+  # The following allows for basic http authentication.  Basic authentication
+  # should not be considered secure for any particularly rigorous definition of
+  # secure.
+
+  # Uncomment the following 3 lines to enable Basic Authentication
+  AuthType Basic
+  AuthName "@{[$self->name]} Subversion Repository"
+  AuthUserFile @{[$self->svnconf_file_path('htpasswd')]}
+
+  # Uncomment the following line to enable Authz Authentication
+#  AuthzSVNAccessFile /etc/apache2/dav_svn.authz
 
+  # The following three lines allow anonymous read, but make
+  # committers authenticate themselves.
+
+  <LimitExcept GET PROPFIND OPTIONS REPORT>
+    Require valid-user
+  </LimitExcept> 
+
+</Location>
+
+
+EOF
+
+    with_write_lock { 
+        open my $fh, '>', $self->svnconf_file_path('httpd.conf') or die $@;
+        print $fh $msg or die $@;
+        close $fh or die $@;
     };
 
 

Modified: commitbit/lib/CommitBit/Model/User.pm
==============================================================================
--- commitbit/lib/CommitBit/Model/User.pm	(original)
+++ commitbit/lib/CommitBit/Model/User.pm	Sat Sep 16 20:28:44 2006
@@ -30,6 +30,8 @@
     unless (length $args->{password}) {
 	$args->{password} = $PASSWORD_GEN->generate;
     }
+    # XXX TODO, confirm email addresses always
+    $args->{'email_confirmed'} = 'true;
     return $self->SUPER::create(%$args);
 }
 

Modified: commitbit/lib/CommitBit/Notification/InviteToProject.pm
==============================================================================
--- commitbit/lib/CommitBit/Notification/InviteToProject.pm	(original)
+++ commitbit/lib/CommitBit/Notification/InviteToProject.pm	Sat Sep 16 20:28:44 2006
@@ -63,11 +63,6 @@
 @{[Jifty->config->framework('Web')->{'BaseURL'}]}/project/@{[$project->name]}
 
 
-Before you can use $appname, we need to make sure that we got your email
-address right.  Click on the link below to get started:
-
-$confirm_url
-
 END_BODY
 }
 


More information about the Rt-commit mailing list