[vhffs-dev] [984] Group's ACLs are now used for all services creations, a user who cannot modify the group cannot asks for new services for this group

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 984
Author:   gradator
Date:     2007-10-14 15:31:37 +0000 (Sun, 14 Oct 2007)

Log Message:
-----------
Group's ACLs are now used for all services creations, a user who cannot modify the group cannot asks for new services for this group

Modified Paths:
--------------
    trunk/vhffs-compat/4.0.sql.in
    trunk/vhffs-panel/cvs/create.pl
    trunk/vhffs-panel/dns/create.pl
    trunk/vhffs-panel/git/create.pl
    trunk/vhffs-panel/mail/create.pl
    trunk/vhffs-panel/mailinglist/create.pl
    trunk/vhffs-panel/mysql/create.pl
    trunk/vhffs-panel/pgsql/create.pl
    trunk/vhffs-panel/repository/create.pl
    trunk/vhffs-panel/svn/create.pl
    trunk/vhffs-panel/web/create.pl


Modified: trunk/vhffs-compat/4.0.sql.in
===================================================================
--- trunk/vhffs-compat/4.0.sql.in	2007-10-14 02:24:40 UTC (rev 983)
+++ trunk/vhffs-compat/4.0.sql.in	2007-10-14 15:31:37 UTC (rev 984)
@@ -373,3 +373,5 @@
 	CONSTRAINT vhffs_git_pkey PRIMARY KEY( git_id )
 ) WITH OIDS;
 
+-- add ACLs on group to group
+INSERT INTO vhffs_acl( granted_oid,target_oid,perm ) ( SELECT object_id,object_id,2 FROM vhffs_groups );

Modified: trunk/vhffs-panel/cvs/create.pl
===================================================================
--- trunk/vhffs-panel/cvs/create.pl	2007-10-14 02:24:40 UTC (rev 983)
+++ trunk/vhffs-panel/cvs/create.pl	2007-10-14 15:31:37 UTC (rev 984)
@@ -52,58 +52,62 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
 my $groupname = $panel->{'groupname'};
 my $cgi = $panel->{cgi};
-my $submitted = defined($cgi->param('cvs_submit'));
+my $templatedir = $panel->{templatedir};
 
-my $reponame;
-my $description;
+unless( $user->can_modify( $group ) ) {
+	my $template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
+	$template->param( MESSAGE => gettext( 'You\'re not allowed to do this (ACL rights)' ) );
 
-my $templatedir = $vhffs->get_config->get_templatedir;
-
-if($submitted) {
-    $reponame = $cgi->param('REPOSITORY_NAME');
-    my $fullreponame = $groupname.'/'.$reponame;
-    $description = $cgi->param('DESCRIPTION');
-    if(!(defined $reponame && defined $description)) {
-        $panel->add_error( gettext('CGI error') );
-    } elsif( !Vhffs::Services::Cvs::check_name($fullreponame) ) {
-        $panel->add_error( gettext('Invalid reponame. It must contain between 3 and 64 characters, only lowercase letters and numbers') );
-    } elsif( $description =~ /^\s*$/ ) {
-        $panel->add_error( gettext('You must enter a description') );
-    } else {
-        #Create CVS
-        my $cvs = Vhffs::Panel::Cvs::create_cvs( $vhffs, $fullreponame, $description, $user , $group );
-        if( defined $cvs ) {
-            my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The CVS object was successfully created !');
-            $panel->redirect($url);
-        } else {
-            $panel->add_error( gettext( 'An error occured while creating the object.It probably already exists' ) );
-        }
-    }
-} else {
-    # Avoid warnings with CGI::escapeHTML
-    $reponame = '';
-    $description = '';
+	$panel->build( $template );
+	$panel->display;
 }
+else {
+	my $submitted = defined($cgi->param('cvs_submit'));
+	my $reponame = '';
+	my $description = '';
 
-if(!$submitted || $panel->has_errors()) {
-    my $template = new HTML::Template( filename => $templatedir."/panel/cvs/create.tmpl" );
+	if($submitted) {
+		$reponame = $cgi->param('REPOSITORY_NAME');
+		my $fullreponame = $groupname.'/'.$reponame;
+		$description = $cgi->param('DESCRIPTION');
+
+		unless( defined $reponame  &&  defined $description ) {
+			$panel->add_error( gettext('CGI error') );
+		} elsif( !Vhffs::Services::Cvs::check_name($fullreponame) ) {
+			$panel->add_error( gettext('Invalid reponame. It must contain between 3 and 64 characters, only lowercase letters and numbers') );
+		} elsif( $description =~ /^\s*$/ ) {
+			$panel->add_error( gettext('You must enter a description') );
+		} else {
+			#Create CVS
+			my $cvs = Vhffs::Panel::Cvs::create_cvs( $vhffs, $fullreponame, $description, $user , $group );
+			if( defined $cvs ) {
+				my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The CVS object was successfully created !');
+				$panel->redirect($url);
+			} else {
+				$panel->add_error( gettext( 'An error occured while creating the object.It probably already exists' ) );
+			}
+		}
+	}
+
+	if( !$submitted || $panel->has_errors() ) {
+		my $template = new HTML::Template( filename => $templatedir.'/panel/cvs/create.tmpl' );
     
-    $panel->set_title( gettext('Create a CVS Repository') );
+		$panel->set_title( gettext('Create a CVS Repository') );
 
-    $template->param( REPOSITORY_NAME => gettext("Repository Name") );
-    $template->param( REPOSITORY_VALUE => CGI::escapeHTML($reponame) );
-    $template->param( GROUP_NAME => gettext("Group owning this CVS") );
+		$template->param( REPOSITORY_NAME => gettext('Repository Name') );
+		$template->param( REPOSITORY_VALUE => CGI::escapeHTML($reponame) );
+		$template->param( GROUP_NAME => gettext('Group owning this CVS') );
 
-    $template->param( GROUP => $group->get_groupname );
-    $template->param( SEND => gettext("Send") );
-    $template->param( DESCRIPTION => gettext("Description") );
-    $template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );
+		$template->param( GROUP => $group->get_groupname );
+		$template->param( SEND => gettext('Send') );
+		$template->param( DESCRIPTION => gettext('Description') );
+		$template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );
 
-    $panel->build( $template );
-$panel->display;
+		$panel->build( $template );
+		$panel->display;
+	}
 }

Modified: trunk/vhffs-panel/dns/create.pl
===================================================================
--- trunk/vhffs-panel/dns/create.pl	2007-10-14 02:24:40 UTC (rev 983)
+++ trunk/vhffs-panel/dns/create.pl	2007-10-14 15:31:37 UTC (rev 984)
@@ -1,4 +1,4 @@
-#!%PERL% -w -I/vhffs/vhffs-api/src/ -I/vhffs/vhffs-panel/
+#!%PERL% -w
 
 use POSIX qw(locale_h);
 use HTML::Template;
@@ -8,7 +8,6 @@
 use CGI::Session;
 use strict;
 
-
 use lib '%VHFFS_LIB_DIR%';
 use Vhffs::User;
 use Vhffs::Main;
@@ -23,51 +22,62 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
+my $templatedir = $panel->{templatedir};
 my $user = $panel->{'user'};
 my $group = $panel->{'group'};
-
 my $cgi = $panel->{cgi};
-my $domain_name = $cgi->param('DOMAIN_NAME');
-my $description = $cgi->param('DESCRIPTION');
 
-my $submitted = defined($cgi->param('dns_submit'));
+unless( $user->can_modify( $group ) ) {
+	my $template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
+	$template->param( MESSAGE => gettext( 'You\'re not allowed to do this (ACL rights)' ) );
 
-my $templatedir = $vhffs->get_config->get_templatedir;
-
-if($submitted) {
-    if( !Vhffs::Functions::check_domain_name($domain_name) ) {
-        $panel->add_error( gettext('Invalid domain name') );
-    } elsif( $description =~ /^\s*$/ ) {
-        $panel->add_error( gettext('You must enter a description') );
-    } else {
-        my $dns = Vhffs::Panel::DNS::create_dns( $vhffs, $domain_name, $description, $user, $group );
-        if( defined $dns ) {
-            my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The DNS object was successfully created !');
-            $panel->redirect($url);
-        } else {
-          $panel->add_error( gettext('An error occured while creating the object. The domain is not correct or aleady exists in Vhffs database') );
-        }
-    }
+	$panel->build( $template );
+	$panel->display;
 }
+else  {
+	my $submitted = defined($cgi->param('dns_submit'));
+	my $domain_name = '';
+	my $description = '';
 
-if(!$submitted || $panel->has_errors()) {
-    my $template = new HTML::Template( filename => $templatedir.'/panel/dns/create.tmpl' );
+	if( $submitted ) {
+		$domain_name = $cgi->param('DOMAIN_NAME');
+		$description = $cgi->param('DESCRIPTION');
 
-    $panel->set_title( gettext('Create a DNS') );
+		unless( defined $domain_name  &&  defined $description ) {
+			$panel->add_error( gettext('CGI error') );
+		} elsif( !Vhffs::Functions::check_domain_name($domain_name) ) {
+			$panel->add_error( gettext('Invalid domain name') );
+		} elsif( $description =~ /^\s*$/ ) {
+			 $panel->add_error( gettext('You must enter a description') );
+		} else {
+			my $dns = Vhffs::Panel::DNS::create_dns( $vhffs, $domain_name, $description, $user, $group );
+			if( defined $dns ) {
+				my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The DNS object was successfully created !');
+				$panel->redirect($url);
+			} else {
+				$panel->add_error( gettext('An error occured while creating the object. The domain is not correct or aleady exists in Vhffs database') );
+			}
+		}
+	}
 
-    $template->param( DOMAIN_NAME => gettext('Domain Name') );
-    $template->param( DOMAIN_NAME_VALUE => $domain_name );
+	if( !$submitted || $panel->has_errors() ) {
+		my $template = new HTML::Template( filename => $templatedir.'/panel/dns/create.tmpl' );
 
-    $template->param( INFOS_DNS => gettext('Be careful ! You must give the reason why you want to host this domain on our servers.') );
-    $template->param( DNS_SERVER => gettext('DNS servers:') );
-    $template->param( GROUP_NAME => gettext('Group owning this DNS') );
+		$panel->set_title( gettext('Create a DNS') );
+
+		$template->param( DOMAIN_NAME => gettext('Domain Name') );
+		$template->param( DOMAIN_NAME_VALUE => $domain_name );
+
+		$template->param( INFOS_DNS => gettext('Be careful ! You must give the reason why you want to host this domain on our servers.') );
+		$template->param( DNS_SERVER => gettext('DNS servers:') );
+		$template->param( GROUP_NAME => gettext('Group owning this DNS') );
     
-    $template->param( GROUP => $group->get_groupname );
-    $template->param( SEND => gettext('Send') );
-    $template->param( DESCRIPTION => gettext('Description') );
-    $template->param( DESCRIPTION_VALUE => $description );
+		$template->param( GROUP => $group->get_groupname );
+		$template->param( SEND => gettext('Send') );
+		$template->param( DESCRIPTION => gettext('Description') );
+		$template->param( DESCRIPTION_VALUE => $description );
 
-    $panel->build( $template );
-$panel->display;
+		$panel->build( $template );
+		$panel->display;
+	}
 }

Modified: trunk/vhffs-panel/git/create.pl
===================================================================
--- trunk/vhffs-panel/git/create.pl	2007-10-14 02:24:40 UTC (rev 983)
+++ trunk/vhffs-panel/git/create.pl	2007-10-14 15:31:37 UTC (rev 984)
@@ -52,52 +52,57 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
+my $groupname = $panel->{groupname};
 my $templatedir = $panel->{templatedir};
-my $groupname = $panel->{groupname};
 my $cgi = $panel->{cgi};
+my $user = $panel->{user};
+my $group = $panel->{group};
 
-my $submitted = $cgi->param('git_submit');
+unless( $user->can_modify( $group ) ) {
+	my $template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
+	$template->param( MESSAGE => gettext( 'You\'re not allowed to do this (ACL rights)' ) );
 
-my $reponame;
-my $description;
-
-if($submitted) {
-    my $user = $panel->{user};
-    my $group = $panel->{group};
-    $reponame = $cgi->param('reponame');
-    my $fullreponame = $groupname.'/'.$reponame.'.git';
-    $description = $cgi->param('description');
-    if(!(defined $reponame && defined $description)) {
-        $panel->add_error( gettext('CGI error') );
-    } elsif( !Vhffs::Services::Git::check_name($fullreponame) ) {
-        $panel->add_error( gettext('Invalid reponame. It must contain between 3 and 64 characters, only lowercase letters and numbers') );
-    } elsif( $description =~ /^\s*$/) {
-        $panel->add_error( gettext('You must enter a description') );
-    } elsif( defined Vhffs::Panel::Git::create_git( $vhffs, $fullreponame, $description, $user, $group ) ) {
-        my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The GIT object was successfully created !');
-        $panel->redirect($url);
-    } else {
-        $panel->add_error( gettext('An error occured while creating the git repository') );
-    }
-} else {
-    $reponame = '';
-    $description = '';
+	$panel->build( $template );
+	$panel->display;
 }
+else {
+	my $submitted = $cgi->param('git_submit');
+	my $reponame = '';
+	my $description = '';
 
-if(!$submitted || $panel->has_errors) {
-	my $template = new HTML::Template( filename => $templatedir.'/panel/git/create.tmpl' );
+	if( $submitted ) {
+		$reponame = $cgi->param('reponame');
+		my $fullreponame = $groupname.'/'.$reponame.'.git';
+		$description = $cgi->param('description');
+		unless( defined $reponame && defined $description ) {
+			$panel->add_error( gettext('CGI error') );
+		} elsif( !Vhffs::Services::Git::check_name($fullreponame) ) {
+			$panel->add_error( gettext('Invalid reponame. It must contain between 3 and 64 characters, only lowercase letters and numbers') );
+		} elsif( $description =~ /^\s*$/) {
+			$panel->add_error( gettext('You must enter a description') );
+		} elsif( defined Vhffs::Panel::Git::create_git( $vhffs, $fullreponame, $description, $user, $group ) ) {
+			my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The GIT object was successfully created !');
+			$panel->redirect($url);
+		} else {
+			$panel->add_error( gettext('An error occured while creating the git repository') );
+		}
+	}
+
+	if( !$submitted || $panel->has_errors ) {
+		my $template = new HTML::Template( filename => $templatedir.'/panel/git/create.tmpl' );
 	
-    $panel->set_title( gettext("Create a git Repository") );
-	$template->param( REPOSITORY_NAME => gettext("Repository Name") );
-    $template->param( REPOSITORY_VALUE => CGI::escapeHTML($reponame) );
-	$template->param( GROUP_NAME => gettext("Group owning this git repository") );
+		$panel->set_title( gettext('Create a git Repository') );
+		$template->param( REPOSITORY_NAME => gettext('Repository Name') );
+		$template->param( REPOSITORY_VALUE => CGI::escapeHTML($reponame) );
+		$template->param( GROUP_NAME => gettext('Group owning this git repository') );
 
-	$template->param( GROUP => $groupname );
-	$template->param( GIT_SUFFIX => '.git' );
-	$template->param( SEND => gettext("Send") );
-	$template->param( DESCRIPTION => gettext("Description") );
-    $template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );
-    $panel->build( $template );
-$panel->display;
+		$template->param( GROUP => $groupname );
+		$template->param( GIT_SUFFIX => '.git' );
+		$template->param( SEND => gettext('Send') );
+		$template->param( DESCRIPTION => gettext('Description') );
+		$template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );
+
+		$panel->build( $template );
+		$panel->display;
+	}
 }
-

Modified: trunk/vhffs-panel/mail/create.pl
===================================================================
--- trunk/vhffs-panel/mail/create.pl	2007-10-14 02:24:40 UTC (rev 983)
+++ trunk/vhffs-panel/mail/create.pl	2007-10-14 15:31:37 UTC (rev 984)
@@ -48,46 +48,55 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
-my $group = $panel->{group};
-my $user = $panel->{user};
 my $groupname = $panel->{groupname};
+my $templatedir = $panel->{templatedir};
 my $cgi = $panel->{cgi};
+my $user = $panel->{user};
+my $group = $panel->{group};
 
-my $domain;
-my $description;
-my $submitted = defined($cgi->param('mail_submit'));
+unless( $user->can_modify( $group ) ) {
+	my $template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
+	$template->param( MESSAGE => gettext( 'You\'re not allowed to do this (ACL rights)' ) );
 
-if($submitted) {
-    $domain = $cgi->param('domain');
-    $description = $cgi->param('description');
-    if(! Vhffs::Functions::check_domain_name($domain) ) {
-        $panel->add_error( gettext('Invalid domain name') );
-    } elsif( $description =~ /^\s*$/ ) {
-        $panel->add_error( gettext('You must enter a description') );
-    } elsif( !defined(Vhffs::Panel::Mail::create_mail( $vhffs , $domain , $description, $user , $group )) ) {
-        $panel->add_error( gettext('An error occured while creating the mail area') );
-    } else {
-        my $url = '/group/view.pl?project='.$groupname.'&msg='.gettext('Mail domain successfully created !');
-        $panel->redirect($url);
-    }
+	$panel->build( $template );
+	$panel->display;
 }
+else  {
+	my $submitted = defined($cgi->param('mail_submit'));
+	my $domain = '';
+	my $description = '';
 
-if( !$submitted || $panel->has_errors() ) {
-    my $templatedir = $vhffs->get_config->get_templatedir;
+	if( $submitted ) {
+		$domain = $cgi->param('domain');
+		$description = $cgi->param('description');
+		unless( defined $domain  &&  defined $description ) {
+			$panel->add_error( gettext('CGI error') );
+		} elsif( !Vhffs::Functions::check_domain_name($domain) ) {
+			$panel->add_error( gettext('Invalid domain name') );
+		} elsif( $description =~ /^\s*$/ ) {
+			$panel->add_error( gettext('You must enter a description') );
+		} elsif( defined(Vhffs::Panel::Mail::create_mail( $vhffs , $domain , $description, $user , $group )) ) {
+			my $url = '/group/view.pl?project='.$groupname.'&msg='.gettext('Mail domain successfully created !');
+			$panel->redirect($url);
+		} else {
+			$panel->add_error( gettext('An error occured while creating the mail area') );
+		}
+	}
 
-    my $template = new HTML::Template( filename => $templatedir.'/panel/mail/create.tmpl' );
+	if( !$submitted || $panel->has_errors() ) {
+		my $template = new HTML::Template( filename => $templatedir.'/panel/mail/create.tmpl' );
 
-    $panel->set_title( gettext('Create a mail space') );
-    $template->param( DOMAIN_TEXT => gettext('Domain') );
-    $template->param( DOMAIN_VALUE => CGI::escapeHTML($domain) );
-    $template->param( GROUP_NAME => gettext('Group owning this mail domain') );
+		$panel->set_title( gettext('Create a mail space') );
+		$template->param( DOMAIN_TEXT => gettext('Domain') );
+		$template->param( DOMAIN_VALUE => CGI::escapeHTML($domain) );
+		$template->param( GROUP_NAME => gettext('Group owning this mail domain') );
 
-    $template->param( GROUP => $groupname );
-    $template->param( SEND => gettext('Send') );
-    $template->param( DESCRIPTION_TEXT => gettext('Tell us for what purpose you want to create this mail domain') );
-    $template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );
+		$template->param( GROUP => $groupname );
+		$template->param( SEND => gettext('Send') );
+		$template->param( DESCRIPTION_TEXT => gettext('Tell us for what purpose you want to create this mail domain') );
+		$template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );
 
-    $panel->build( $template );
-$panel->display;
+		$panel->build( $template );
+		$panel->display;
+	}
 }
-

Modified: trunk/vhffs-panel/mailinglist/create.pl
===================================================================
--- trunk/vhffs-panel/mailinglist/create.pl	2007-10-14 02:24:40 UTC (rev 983)
+++ trunk/vhffs-panel/mailinglist/create.pl	2007-10-14 15:31:37 UTC (rev 984)
@@ -49,70 +49,74 @@
 my $session = $panel->get_session;
 exit 0 unless $session;
 
-my $vhffs           = $panel->{vhffs};
-my $user            = $panel->{user};
-my $group           = $panel->{group};
-my $groupname       = $panel->{groupname};
-my $cgi             = $panel->{cgi};
-my $submitted       = $cgi->param('mailing_submit');
+my $vhffs = $panel->{vhffs};
+my $groupname = $panel->{groupname};
+my $templatedir = $panel->{templatedir};
+my $cgi = $panel->{cgi};
+my $user = $panel->{user};
+my $group = $panel->{group};
 
-# Get default domain for list configured in the config file
-my $list_conf       = $vhffs->get_config->get_service("mailinglist");
-my $default_domain = $list_conf->{'default_domain'};
+unless( $user->can_modify( $group ) ) {
+	my $template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
+	$template->param( MESSAGE => gettext( 'You\'re not allowed to do this (ACL rights)' ) );
 
-my $localpart;
-my $domain;
-my $description;
-
-if($submitted) {
-    $localpart = $cgi->param( 'localpart' );
-    $domain = $cgi->param( 'domain' );
-    $description = $cgi->param( 'description' );
-    if( !defined($localpart) || !defined($domain) || !defined($description) ) {
-        $panel->add_error( gettext('CGI error') );
-    } elsif( $description =~ /^\s*$/ ) {
-        $panel->add_error( gettext('You must enter a description') );
-    } elsif( $localpart !~ /^[a-z0-9\_\-]+$/ ) {
-        $panel->add_error( gettext('Invalid local part') );
-        $localpart = '';
-    } elsif( $domain ne $default_domain && (! Vhffs::Panel::Mail::is_owned_by_group( $vhffs, $domain, $group->get_gid ) ) ) {
-        $panel->add_error( gettext('You do not own this domain !') );
-    } elsif( !defined(Vhffs::Panel::MailingList::create_list( $vhffs, $localpart, $domain, $description, $user, $group )) ) {
-        $panel->add_error( gettext('An error occured while creating the object.It probably already exists') );
-    } else {
-        my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The mailing list object was successfully created !');
-        $panel->redirect( $url );
-    }
+	$panel->build( $template );
+	$panel->display;
 }
+else  {
+	my $submitted = $cgi->param('mailing_submit');
+	my $localpart = '';
+	my $domain = '';
+	my $description = '';
+	# Get default domain for list configured in the config file
+	my $default_domain = $vhffs->get_config->get_service('mailinglist')->{'default_domain'};
+	
+	if( $submitted ) {
+		$localpart = $cgi->param( 'localpart' );
+		$domain = $cgi->param( 'domain' );
+		$description = $cgi->param( 'description' );
 
-my $template;
+		unless( defined $localpart  &&  defined $domain  &&  defined $description ) {
+			$panel->add_error( gettext('CGI error') );
+		} elsif( $description =~ /^\s*$/ ) {
+			$panel->add_error( gettext('You must enter a description') );
+		} elsif( $localpart !~ /^[a-z0-9\_\-]+$/ ) {
+			$panel->add_error( gettext('Invalid local part') );
+		} elsif( $domain ne $default_domain &&  !Vhffs::Panel::Mail::is_owned_by_group( $vhffs, $domain, $group->get_gid ) ) {
+			$panel->add_error( gettext('You do not own this domain !') );
+		} elsif( defined Vhffs::Panel::MailingList::create_list( $vhffs, $localpart, $domain, $description, $user, $group ) ) {
+			my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The mailing list object was successfully created !');
+			$panel->redirect( $url );
+		} else {
+			$panel->add_error( gettext('An error occured while creating the object.It probably already exists') );
+		}
+	}
 
-if(!$submitted || $panel->has_errors()) {
-    my $domains = Vhffs::Panel::MailingList::getall_mdomains_per_group( $vhffs, $group->get_gid );
-    push(@$domains, { domain => $default_domain }) if(defined $default_domain);
+	if( !$submitted || $panel->has_errors() ) {
+		my $domains = Vhffs::Panel::MailingList::getall_mdomains_per_group( $vhffs, $group->get_gid );
+		push(@$domains, { domain => $default_domain }) if( defined $default_domain );
 
-    my $templatedir = $vhffs->get_config->get_templatedir;
+		$panel->set_title( gettext('Create a new mailing list') );
 
-    $panel->set_title( gettext("Create a new mailing list") );
+		if( ( !@$domains ) && ( ! defined $default_domain ) ) {
+			$panel->add_error( gettext('There is no default mail domain on this platform, you have to create a mail domain before creating a mailing list') );
+		} else {
+			my $template = new HTML::Template::Expr( filename => $templatedir.'/panel/mailinglist/create.tmpl', global_vars => 1 );
 
-    if( ( !@$domains ) && ( ! defined $default_domain ) ) {
-        $panel->add_error( gettext('There is no default mail domain on this platform, you have to create a mail domain before creating a mailing list') );
-    } else {
-	    $template = new HTML::Template::Expr( filename => $templatedir."/panel/mailinglist/create.tmpl", global_vars => 1 );
+			$template->param( LIST_TEXT => gettext('Mail for the list') );
+			$template->param( GROUP_NAME => gettext('Group owning this mailing list') );
 
-    	$template->param( LIST_TEXT => gettext("Mail for the list") );
-    	$template->param( GROUP_NAME => gettext("Group owning this mailing list") );
+			$template->param( DOMAINS => $domains );
+			$template->param( GROUP => $group->get_groupname );
+			$template->param( SEND => gettext('Send') );
+			$template->param( MOTIVATION => gettext('Tell us what the use of this mailing list will be') );
 
-	    $template->param( DOMAINS => $domains );
-    	$template->param( GROUP => $group->get_groupname );
-    	$template->param( SEND => gettext("Send") );
-	    $template->param( MOTIVATION => gettext("Tell us what the use of this mailing list will be") );
+			$template->param( LOCALPART_VALUE => $localpart );
+			$template->param( DOMAIN_VALUE => $domain );
+			$template->param( DESCRIPTION_VALUE => $description );
 
-        $template->param( LOCALPART_VALUE => $localpart );
-        $template->param( DOMAIN_VALUE => $domain );
-        $template->param( DESCRIPTION_VALUE => $description );
-    }
+			$panel->build( $template );
+			$panel->display;
+		}
+	}
 }
-
-$panel->build( $template );
-$panel->display;

Modified: trunk/vhffs-panel/mysql/create.pl
===================================================================
--- trunk/vhffs-panel/mysql/create.pl	2007-10-14 02:24:40 UTC (rev 983)
+++ trunk/vhffs-panel/mysql/create.pl	2007-10-14 15:31:37 UTC (rev 984)
@@ -50,60 +50,66 @@
 my $session = $panel->get_session;
 exit 0 unless $session;
 
+my $vhffs = $panel->{vhffs};
 my $groupname = $panel->{groupname};
 my $templatedir = $panel->{templatedir};
 my $cgi = $panel->{cgi};
+my $user = $panel->{user};
+my $group = $panel->{group};
 
-my $template = new HTML::Template( filename => $templatedir.'/panel/mysql/create.tmpl' );
-my $submitted = defined($cgi->param('mysql_submit'));
-my $dbprefix = $groupname.'_';
+unless( $user->can_modify( $group ) ) {
+	my $template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
+	$template->param( MESSAGE => gettext( 'You\'re not allowed to do this (ACL rights)' ) );
 
-my $dbsuffix;
-my $description;
-
-if($submitted) {
-    my $vhffs = $panel->{vhffs};
-    my $user = $panel->{user};
-    my $group = $panel->{group};
-    my $dbpass = $cgi->param('db_pass');
-    $dbsuffix = $cgi->param('db_suffix');
-    my $dbname = $dbprefix.$dbsuffix;
-    my $dbuser = $dbname;
-    $description = $cgi->param('description');
-    if(!(defined $dbpass && defined $dbsuffix && defined $description)) {
-        $panel->add_error( gettext('CGI error') );
-    } elsif($description =~ /^\s*$/) {
-        $panel->add_error( gettext('You must enter a description') );
-    } elsif(!Vhffs::Services::Mysql::check_dbname($dbname)) {
-        $panel->add_error( gettext('Invalid database name, it must contain only numbers, lowercase letters and underscore (the latter isn\'t allowed in first or last position) and be between 3 and 32 characters.') );
-    } elsif(!Vhffs::Services::Mysql::check_dbpass($dbpass)) {
-        $panel->add_error( gettext('Invalid password. It must be at least 3 characters and contain only letters (lower and uppercase) and numbers') );
-    } elsif(defined Vhffs::Panel::Mysql::create_mysql($vhffs, $dbname, $user, $group, $dbuser, $dbpass, $description)) {
-        my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The MySQL DB was successfully created !');
-        $panel->redirect($url);
-    } else {
-        $panel->add_error( 'An error occured while creating the object.' );
-    }
-    
-} else {
-# Avoid warnings with escapeHTML
-    $dbsuffix = '';
-    $description = '';
+	$panel->build( $template );
+	$panel->display;
 }
+else  {
+	my $submitted = defined($cgi->param('mysql_submit'));
+	my $dbsuffix = '';
+	my $description = '';
+	my $dbpass = '';
 
-if(!$submitted || $panel->has_errors()) {
-    $panel->set_title( gettext('Create a MySQL database') );
-    $template->param( INFOS => sprintf( gettext('The database name is prefixed by your groupname followed by an underscore (%s_dbname). The database user is the database full name (%s_dbname).') , $groupname, $groupname) );
-    $template->param( GROUP_NAME => gettext("Group owning this database") );
-    $template->param( DB_PREFIX => $dbprefix );
-    $template->param( DB_SUFFIX => gettext("MySQL database name ") );
-    $template->param( DB_SUFFIX_VALUE => CGI::escapeHTML($dbsuffix) );
-    $template->param( DB_PASS => gettext("MySQL password for this database ") );
-    $template->param( GROUP => $groupname );
-    $template->param( SEND => gettext("Send") );
-    $template->param( DESCRIPTION => gettext("Description") );
-    $template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );
+	if( $submitted ) {
+		$dbsuffix = $cgi->param('db_suffix');
+		my $dbname = $groupname.'_'.$dbsuffix;
+		my $dbuser = $dbname;
+		$dbpass = $cgi->param('db_pass');
+		$description = $cgi->param('description');
 
-    $panel->build( $template );
-$panel->display;
+		unless( defined $dbpass  &&  defined $dbsuffix  &&  defined $description ) {
+			$panel->add_error( gettext('CGI error') );
+		} elsif($description =~ /^\s*$/) {
+			$panel->add_error( gettext('You must enter a description') );
+		} elsif(!Vhffs::Services::Mysql::check_dbname($dbname)) {
+			$panel->add_error( gettext('Invalid database name, it must contain only numbers, lowercase letters and underscore (the latter isn\'t allowed in first or last position) and be between 3 and 32 characters.') );
+		} elsif(!Vhffs::Services::Mysql::check_dbpass($dbpass)) {
+			$panel->add_error( gettext('Invalid password. It must be at least 3 characters and contain only letters (lower and uppercase) and numbers') );
+		} elsif(defined Vhffs::Panel::Mysql::create_mysql($vhffs, $dbname, $user, $group, $dbuser, $dbpass, $description)) {
+			my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The MySQL DB was successfully created !');
+			$panel->redirect($url);
+		} else {
+			$panel->add_error( 'An error occured while creating the object.' );
+		}
+	}
+
+	if( !$submitted || $panel->has_errors() ) {
+		my $template = new HTML::Template( filename => $templatedir.'/panel/mysql/create.tmpl' );
+
+		$panel->set_title( gettext('Create a MySQL database') );
+
+		$template->param( INFOS => sprintf( gettext('The database name is prefixed by your groupname followed by an underscore (%s_dbname). The database user is the database full name (%s_dbname).') , $groupname, $groupname) );
+		$template->param( GROUP_NAME => gettext('Group owning this database') );
+		$template->param( DB_PREFIX => $groupname.'_' );
+		$template->param( DB_SUFFIX => gettext('MySQL database name ') );
+		$template->param( DB_SUFFIX_VALUE => CGI::escapeHTML($dbsuffix) );
+		$template->param( DB_PASS => gettext('MySQL password for this database ') );
+		$template->param( GROUP => $groupname );
+		$template->param( SEND => gettext('Send') );
+		$template->param( DESCRIPTION => gettext('Description') );
+		$template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );
+
+		$panel->build( $template );
+		$panel->display;
+	}
 }

Modified: trunk/vhffs-panel/pgsql/create.pl
===================================================================
--- trunk/vhffs-panel/pgsql/create.pl	2007-10-14 02:24:40 UTC (rev 983)
+++ trunk/vhffs-panel/pgsql/create.pl	2007-10-14 15:31:37 UTC (rev 984)
@@ -50,60 +50,66 @@
 my $session = $panel->get_session;
 exit 0 unless $session;
 
+my $vhffs = $panel->{vhffs};
 my $groupname = $panel->{groupname};
 my $templatedir = $panel->{templatedir};
 my $cgi = $panel->{cgi};
+my $user = $panel->{user};
+my $group = $panel->{group};
 
-my $template = new HTML::Template( filename => $templatedir.'/panel/pgsql/create.tmpl' );
-my $submitted = defined($cgi->param('pgsql_submit'));
-my $dbprefix = $groupname.'_';
+unless( $user->can_modify( $group ) ) {
+	my $template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
+	$template->param( MESSAGE => gettext( 'You\'re not allowed to do this (ACL rights)' ) );
 
-my $dbsuffix;
-my $description;
-
-if($submitted) {
-    my $vhffs = $panel->{vhffs};
-    my $user = $panel->{user};
-    my $group = $panel->{group};
-    my $dbpass = $cgi->param('db_pass');
-    $dbsuffix = $cgi->param('db_suffix');
-    my $dbname = $dbprefix.$dbsuffix;
-    my $dbuser = $dbname;
-    $description = $cgi->param('description');
-    if(!(defined $dbpass && defined $dbsuffix && defined $description)) {
-        $panel->add_error( gettext('CGI error') );
-    } elsif($description =~ /^\s*$/) {
-        $panel->add_error( gettext('You must enter a description') );
-    } elsif(!Vhffs::Services::Pgsql::check_dbname($dbname)) {
-        $panel->add_error( gettext('Invalid database name, it must contain only numbers, lowercase letters and underscore (the latter isn\'t allowed in first or last position) and be between 3 and 32 characters.') );
-    } elsif(!Vhffs::Services::Pgsql::check_dbpass($dbpass)) {
-        $panel->add_error( gettext('Invalid password. It must be at least 3 characters and contain only letters (lower and uppercase) and numbers') );
-    } elsif(defined Vhffs::Panel::Pgsql::create_pgsql($vhffs, $dbname, $user, $group, $dbuser, $dbpass, $description)) {
-        my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The PostgreSQL DB was successfully created !');
-        $panel->redirect($url);
-    } else {
-        $panel->add_error( 'An error occured while creating the object.' );
-    }
-    
-} else {
-# Avoid warnings with escapeHTML
-    $dbsuffix = '';
-    $description = '';
+	$panel->build( $template );
+	$panel->display;
 }
+else  {
+	my $submitted = defined($cgi->param('pgsql_submit'));
+	my $dbsuffix = '';
+	my $description = '';
+	my $dbpass = '';
 
-if(!$submitted || $panel->has_errors()) {
-    $panel->set_title( gettext('Create a PostgreSQL database') );
-    $template->param( INFOS => sprintf( gettext('The database name is prefixed by your groupname followed by an underscore (%s_dbname). The database user is the database full name (%s_dbname).') , $groupname, $groupname) );
-    $template->param( GROUP_NAME => gettext("Group owning this database") );
-    $template->param( DB_PREFIX => $dbprefix );
-    $template->param( DB_SUFFIX => gettext("PostgreSQL database name ") );
-    $template->param( DB_SUFFIX_VALUE => CGI::escapeHTML($dbsuffix) );
-    $template->param( DB_PASS => gettext("PostgreSQL password for this database ") );
-    $template->param( GROUP => $groupname );
-    $template->param( SEND => gettext("Send") );
-    $template->param( DESCRIPTION => gettext("Description") );
-    $template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );
+	if( $submitted ) {
+		$dbsuffix = $dbsuffix = $cgi->param('db_suffix');
+		my $dbname = $groupname.'_'.$dbsuffix;
+		my $dbuser = $dbname;
+		$dbpass = $cgi->param('db_pass');
+		$description = $cgi->param('description');
 
-    $panel->build( $template );
-$panel->display;
+		unless( defined $dbpass  &&  defined $dbsuffix  &&  defined $description ) {
+			$panel->add_error( gettext('CGI error') );
+		} elsif($description =~ /^\s*$/) {
+			$panel->add_error( gettext('You must enter a description') );
+		} elsif(!Vhffs::Services::Pgsql::check_dbname($dbname)) {
+			$panel->add_error( gettext('Invalid database name, it must contain only numbers, lowercase letters and underscore (the latter isn\'t allowed in first or last position) and be between 3 and 32 characters.') );
+		} elsif(!Vhffs::Services::Pgsql::check_dbpass($dbpass)) {
+			$panel->add_error( gettext('Invalid password. It must be at least 3 characters and contain only letters (lower and uppercase) and numbers') );
+		} elsif(defined Vhffs::Panel::Pgsql::create_pgsql($vhffs, $dbname, $user, $group, $dbuser, $dbpass, $description)) {
+			my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The PostgreSQL DB was successfully created !');
+			$panel->redirect($url);
+		} else {
+			$panel->add_error( 'An error occured while creating the object.' );
+		}
+	}
+
+	if( !$submitted || $panel->has_errors() ) {
+		my $template = new HTML::Template( filename => $templatedir.'/panel/pgsql/create.tmpl' );
+
+		$panel->set_title( gettext('Create a PostgreSQL database') );
+
+		$template->param( INFOS => sprintf( gettext('The database name is prefixed by your groupname followed by an underscore (%s_dbname). The database user is the database full name (%s_dbname).') , $groupname, $groupname) );
+		$template->param( GROUP_NAME => gettext("Group owning this database") );
+		$template->param( DB_PREFIX => $groupname.'_' );
+		$template->param( DB_SUFFIX => gettext("PostgreSQL database name ") );
+		$template->param( DB_SUFFIX_VALUE => CGI::escapeHTML($dbsuffix) );
+		$template->param( DB_PASS => gettext("PostgreSQL password for this database ") );
+		$template->param( GROUP => $groupname );
+		$template->param( SEND => gettext("Send") );
+		$template->param( DESCRIPTION => gettext("Description") );
+		$template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );
+
+		$panel->build( $template );
+		$panel->display;
+	}
 }

Modified: trunk/vhffs-panel/repository/create.pl
===================================================================
--- trunk/vhffs-panel/repository/create.pl	2007-10-14 02:24:40 UTC (rev 983)
+++ trunk/vhffs-panel/repository/create.pl	2007-10-14 15:31:37 UTC (rev 984)
@@ -51,47 +51,53 @@
 my $session = $panel->get_session;
 exit 0 unless $session;
 
+my $vhffs = $panel->{vhffs};
 my $groupname = $panel->{groupname};
 my $templatedir = $panel->{templatedir};
 my $cgi = $panel->{cgi};
+my $user = $panel->{user};
+my $group = $panel->{group};
 
-my $submitted = $cgi->param('repo_submit');
+unless( $user->can_modify( $group ) ) {
+	my $template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
+	$template->param( MESSAGE => gettext( 'You\'re not allowed to do this (ACL rights)' ) );
 
-my $description;
-
-if($submitted) {
-    my $user = $panel->{user};
-    my $group = $panel->{group};
-    my $vhffs = $panel->{vhffs};
-    $description = $cgi->param('description');
-    if(!defined $description) {
-        $panel->add_error( gettext('CGI error') );
-    } elsif($description =~ /^\s*$/) {
-        $panel->add_error( gettext('You must enter a description') );
-    } elsif( defined Vhffs::Panel::Repository::create_repository( $vhffs, $groupname, $user, $group , $description ) ) {
-        my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The repository was successfully created !');
-        $panel->redirect($url);
-    } else {
-        $panel->add_error( gettext('An error occured while creating the object. Check that this group doesn\'t already have a download repository') );
-    }
-} else {
-    $description = '';
+	$panel->build( $template );
+	$panel->display;
 }
+else  {
+	my $submitted = $cgi->param('repo_submit');
+	my $description = '';
 
-if(!$submitted || $panel->has_errors()) {
-    my $template = new HTML::Template( filename => $templatedir."/panel/repository/create.tmpl" );
+	if( $submitted ) {
+		$description = $cgi->param('description');
 
-    $panel->set_title( gettext('Create a Download Repository') );
-    $template->param( REPOSITORY_NAME => gettext("Repository Name") );
-    $template->param( GROUP_NAME => gettext("Group owning this repository") );
+		unless( defined $description ) {
+			$panel->add_error( gettext('CGI error') );
+		} elsif($description =~ /^\s*$/) {
+			$panel->add_error( gettext('You must enter a description') );
+		} elsif( defined Vhffs::Panel::Repository::create_repository( $vhffs, $groupname, $user, $group , $description ) ) {
+			my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The repository was successfully created !');
+			$panel->redirect($url);
+		} else {
+			$panel->add_error( gettext('An error occured while creating the object. Check that this group doesn\'t already have a download repository') );
+		}
+	}
 
+	if( !$submitted || $panel->has_errors() ) {
+		my $template = new HTML::Template( filename => $templatedir.'/panel/repository/create.tmpl' );
 
-    $template->param( GROUP => $groupname );
-    $template->param( NAME => $groupname );
-    $template->param( SEND => gettext("Send") );
-    $template->param( DESCRIPTION => gettext("Description") );
-    $template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );
+		$panel->set_title( gettext('Create a Download Repository') );
+		$template->param( REPOSITORY_NAME => gettext('Repository Name') );
+		$template->param( GROUP_NAME => gettext('Group owning this repository') );
 
-    $panel->build( $template );
-    $panel->display;
+		$template->param( GROUP => $groupname );
+		$template->param( NAME => $groupname );
+		$template->param( SEND => gettext('Send') );
+		$template->param( DESCRIPTION => gettext('Description') );
+		$template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );
+
+		$panel->build( $template );
+		$panel->display;
+	}
 }

Modified: trunk/vhffs-panel/svn/create.pl
===================================================================
--- trunk/vhffs-panel/svn/create.pl	2007-10-14 02:24:40 UTC (rev 983)
+++ trunk/vhffs-panel/svn/create.pl	2007-10-14 15:31:37 UTC (rev 984)
@@ -51,51 +51,56 @@
 exit 0 unless $session;
 
 my $vhffs = $panel->{vhffs};
+my $groupname = $panel->{groupname};
 my $templatedir = $panel->{templatedir};
-my $groupname = $panel->{groupname};
 my $cgi = $panel->{cgi};
+my $user = $panel->{user};
+my $group = $panel->{group};
 
-my $submitted = $cgi->param('svn_submit');
+unless( $user->can_modify( $group ) ) {
+	my $template = new HTML::Template( filename => $templatedir.'/panel/misc/simplemsg.tmpl' );
+	$template->param( MESSAGE => gettext( 'You\'re not allowed to do this (ACL rights)' ) );
 
-my $reponame;
-my $description;
-
-if($submitted) {
-    my $user = $panel->{user};
-    my $group = $panel->{group};
-    $reponame = $cgi->param('reponame');
-    my $fullreponame = $groupname.'/'.$reponame;
-    $description = $cgi->param('description');
-    if(!(defined $reponame && defined $description)) {
-        $panel->add_error( gettext('CGI error') );
-    } elsif( !Vhffs::Services::Svn::check_name($fullreponame) ) {
-        $panel->add_error( gettext('Invalid reponame. It must contain between 3 and 64 characters, only lowercase letters and numbers') );
-    } elsif( $description =~ /^\s*$/) {
-        $panel->add_error( gettext('You must enter a description') );
-    } elsif( defined Vhffs::Panel::Svn::create_svn( $vhffs, $fullreponame, $description, $user, $group ) ) {
-        my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The SVN object was successfully created !');
-        $panel->redirect($url);
-    } else {
-        $panel->add_error( gettext('An error occured while creating the svn repository') );
-    }
-} else {
-    $reponame = '';
-    $description = '';
+	$panel->build( $template );
+	$panel->display;
 }
+else  {
+	my $submitted = $cgi->param('svn_submit');
+	my $reponame = '';
+	my $description = '';
 
-if(!$submitted || $panel->has_errors) {
-	my $template = new HTML::Template( filename => $templatedir.'/panel/svn/create.tmpl' );
+	if( $submitted ) {
+		$reponame = $cgi->param('reponame');
+		my $fullreponame = $groupname.'/'.$reponame;
+		$description = $cgi->param('description');
+
+		unless( defined $reponame && defined $description ) {
+			$panel->add_error( gettext('CGI error') );
+		} elsif( !Vhffs::Services::Svn::check_name($fullreponame) ) {
+			$panel->add_error( gettext('Invalid reponame. It must contain between 3 and 64 characters, only lowercase letters and numbers') );
+		} elsif( $description =~ /^\s*$/) {
+			$panel->add_error( gettext('You must enter a description') );
+		} elsif( defined Vhffs::Panel::Svn::create_svn( $vhffs, $fullreponame, $description, $user, $group ) ) {
+			my $url = '/group/view.pl?project='.$panel->{groupname}.'&msg='.gettext('The SVN object was successfully created !');
+			$panel->redirect($url);
+		} else {
+			$panel->add_error( gettext('An error occured while creating the svn repository') );
+		}
+	}
+
+	if( !$submitted || $panel->has_errors ) {
+		my $template = new HTML::Template( filename => $templatedir.'/panel/svn/create.tmpl' );
 	
-    $panel->set_title( gettext("Create a Subversion Repository") );
-	$template->param( REPOSITORY_NAME => gettext("Repository Name") );
-    $template->param( REPOSITORY_VALUE => CGI::escapeHTML($reponame) );
-	$template->param( GROUP_NAME => gettext("Group owning this Subversion repository") );
+		$panel->set_title( gettext('Create a Subversion Repository') );
+		$template->param( REPOSITORY_NAME => gettext('Repository Name') );
+		$template->param( REPOSITORY_VALUE => CGI::escapeHTML($reponame) );
+		$template->param( GROUP_NAME => gettext('Group owning this Subversion repository') );
 
-	$template->param( GROUP => $groupname );
-	$template->param( SEND => gettext("Send") );
-	$template->param( DESCRIPTION => gettext("Description") );
-    $template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );
-    $panel->build( $template );
-$panel->display;
+		$template->param( GROUP => $groupname );
+		$template->param( SEND => gettext('Send') );
+		$template->param( DESCRIPTION => gettext('Description') );
+		$template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );
+		$panel->build( $template );
+		$panel->display;
+	}
 }
-

Modified: trunk/vhffs-panel/web/create.pl
===================================================================
--- trunk/vhffs-panel/web/create.pl	2007-10-14 02:24:40 UTC (rev 983)
+++ trunk/vhffs-panel/web/create.pl	2007-10-14 15:31:37 UTC (rev 984)
@@ -66,8 +66,8 @@
 }
 else  {
 	my $submitted = defined($cgi->param('web_submit'));
-	my $servername;
-	my $description;
+	my $servername = '';
+	my $description = '';
 
 	if( $submitted ) {
 		$servername = $cgi->param('servername');
@@ -91,16 +91,16 @@
 
 	if( !$submitted || $panel->has_errors() ) {
 		my $template = new HTML::Template( filename => $templatedir.'/panel/web/create.tmpl' );
-		$panel->set_title( gettext("Create a web space") );
-		$template->param( SERVERNAME_TEXT => gettext("Adress (ServerName directive)") );
-		$template->param( SERVERNAME_WARNING => gettext("Be careful, if you want create www.domain.tld, you should create a webspace with domain.tld as servername. VHFFS redirect all request from www.domain.tld to domain.tld") );
+		$panel->set_title( gettext('Create a web space') );
+		$template->param( SERVERNAME_TEXT => gettext('Address (ServerName directive)') );
+		$template->param( SERVERNAME_WARNING => gettext('Be careful, if you want create www.domain.tld, you should create a webspace with domain.tld as servername. VHFFS redirect all request from www.domain.tld to domain.tld') );
 		$template->param( SERVERNAME_VALUE => CGI::escapeHTML($servername) );
-		$template->param( GROUP_NAME => gettext("Group owning this web space") );
+		$template->param( GROUP_NAME => gettext('Group owning this web space') );
 
 		$template->param( GROUP => $groupname );
-		$template->param( SEND => gettext("Send") );
-		$template->param( DESCRIPTION => gettext("Tell us what the use of this web space will be") );
-		$template->param( WARNING_PUBLIC => gettext("Please consider that this description is going to be displayed in the public area. So you have to write it in impersonal form. You should take care to write it with correct grammar and tenses. Take all the time you need to fill it with the best content you are able to do.") ) if $panel->is_public;
+		$template->param( SEND => gettext('Send') );
+		$template->param( DESCRIPTION => gettext('Tell us what the use of this web space will be') );
+		$template->param( WARNING_PUBLIC => gettext('Please consider that this description is going to be displayed in the public area. So you have to write it in impersonal form. You should take care to write it with correct grammar and tenses. Take all the time you need to fill it with the best content you are able to do.') ) if $panel->is_public;
 		$template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );
 
 		$panel->build( $template );


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/