[vhffs-dev] [716] OK, let's rebuild everything before destroying again.

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


Revision: 716
Author:   beuss
Date:     2007-07-12 12:34:00 +0000 (Thu, 12 Jul 2007)

Log Message:
-----------
OK, let's rebuild everything before destroying again.
Services access and creation are operational. Next step: remove owner_gid from every table except Object.

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Services/Cvs.pm
    trunk/vhffs-api/src/Vhffs/Services/DNS.pm
    trunk/vhffs-api/src/Vhffs/Services/Httpd.pm
    trunk/vhffs-api/src/Vhffs/Services/Mail.pm
    trunk/vhffs-api/src/Vhffs/Services/Mailing.pm
    trunk/vhffs-api/src/Vhffs/Services/Mysql.pm
    trunk/vhffs-api/src/Vhffs/Services/Postgres.pm
    trunk/vhffs-api/src/Vhffs/Services/Repository.pm
    trunk/vhffs-api/src/Vhffs/Services/Svn.pm
    trunk/vhffs-api/src/Vhffs/User.pm


Modified: trunk/vhffs-api/src/Vhffs/Services/Cvs.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Services/Cvs.pm	2007-07-12 11:49:12 UTC (rev 715)
+++ trunk/vhffs-api/src/Vhffs/Services/Cvs.pm	2007-07-12 12:34:00 UTC (rev 716)
@@ -101,7 +101,7 @@
     $dbh->begin_work;
     eval {
 
-        my $parent = Vhffs::Object::create($main, $user->get_uid, $description, undef, Vhffs::Constants::TYPE_CVS);
+        my $parent = Vhffs::Object::create($main, $user->get_uid, $group->get_gid, $description, undef, Vhffs::Constants::TYPE_CVS);
 
         die('Unable to create parent object') unless(defined($parent));
 
@@ -228,7 +228,7 @@
 sub _new {
     my ($class, $main, $cvs_id, $cvsroot, $owner_uid, $owner_gid, $public, $oid, $date_creation, $description, $state) = @_;
     
-    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $date_creation, $description, $state, Vhffs::Constants::TYPE_CVS);
+    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $owner_gid, $date_creation, $description, $state, Vhffs::Constants::TYPE_CVS);
     return undef unless(defined $self);
     
     $self->{cvsroot} = $cvsroot;

Modified: trunk/vhffs-api/src/Vhffs/Services/DNS.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Services/DNS.pm	2007-07-12 11:49:12 UTC (rev 715)
+++ trunk/vhffs-api/src/Vhffs/Services/DNS.pm	2007-07-12 12:34:00 UTC (rev 716)
@@ -115,7 +115,7 @@
 
     eval {
 
-        my $parent = Vhffs::Object::create($main, $user->get_uid, $description, undef, Vhffs::Constants::TYPE_DNS);
+        my $parent = Vhffs::Object::create($main, $user->get_uid, $group->get_gid, $description, undef, Vhffs::Constants::TYPE_DNS);
 
         die('Unable to create parent object') unless(defined $parent);
 
@@ -282,7 +282,7 @@
 {
     my ($class, $main, $dns_id, $domain, $owner_gid, $ns, $mbox, $serial, $refresh, $retry, $expire, $minimum, $ttl, $oid, $owner_uid, $date_creation, $state, $description, $a, $nsr, $cname, $mx, $srv, $aaaa, $txt) = @_;
 
-    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $date_creation, $description, $state, Vhffs::Constants::TYPE_DNS);
+    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $owner_gid, $date_creation, $description, $state, Vhffs::Constants::TYPE_DNS);
 
     $self->{dns_id} = $dns_id;
     $self->{domain} = $domain;

Modified: trunk/vhffs-api/src/Vhffs/Services/Httpd.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Services/Httpd.pm	2007-07-12 11:49:12 UTC (rev 715)
+++ trunk/vhffs-api/src/Vhffs/Services/Httpd.pm	2007-07-12 12:34:00 UTC (rev 716)
@@ -79,7 +79,7 @@
     $dbh->begin_work;
 
     eval {
-        my $parent =  Vhffs::Object::create($main, $user->get_uid, $description, undef, Vhffs::Constants::TYPE_HTTPD);
+        my $parent =  Vhffs::Object::create($main, $user->get_uid, $group->get_gid, $description, undef, Vhffs::Constants::TYPE_HTTPD);
     
         die('Unable to create parent object') unless(defined($parent));
 
@@ -338,7 +338,7 @@
 sub _new {
     my ($class, $main, $httpd_id, $servername, $owner_uid, $owner_gid, $oid, $date_creation, $description, $state) = @_;
 
-    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $date_creation, $description, $state, Vhffs::Constants::TYPE_HTTPD);
+    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $owner_gid, $date_creation, $description, $state, Vhffs::Constants::TYPE_HTTPD);
     return undef unless(defined($self));
 
     foreach (qw(httpd_id servername owner_gid)) {

Modified: trunk/vhffs-api/src/Vhffs/Services/Mail.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Services/Mail.pm	2007-07-12 11:49:12 UTC (rev 715)
+++ trunk/vhffs-api/src/Vhffs/Services/Mail.pm	2007-07-12 12:34:00 UTC (rev 716)
@@ -101,7 +101,7 @@
     $dbh->begin_work;
 
     eval {
-        my $parent = Vhffs::Object::create($main, $user->get_uid, $description, undef, Vhffs::Constants::TYPE_MAIL);
+        my $parent = Vhffs::Object::create($main, $user->get_uid, $group->get_gid, $description, undef, Vhffs::Constants::TYPE_MAIL);
 
         die('Unable to create parent object') unless(defined $parent);
 
@@ -533,7 +533,7 @@
 
 sub _new {
     my ($class, $main, $mxdomain_id, $owner_gid, $domain, $unix_user, $boxes_path, $max_popbox, $catchall, $oid, $owner_uid, $date_creation, $state, $description, $boxes, $forwards) = @_;
-    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $date_creation, $description, $state, Vhffs::Constants::TYPE_MAIL);
+    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $owner_gid, $date_creation, $description, $state, Vhffs::Constants::TYPE_MAIL);
     return undef unless defined($self);
     
     $self->{mxdomain_id} = $mxdomain_id;

Modified: trunk/vhffs-api/src/Vhffs/Services/Mailing.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Services/Mailing.pm	2007-07-12 11:49:12 UTC (rev 715)
+++ trunk/vhffs-api/src/Vhffs/Services/Mailing.pm	2007-07-12 12:34:00 UTC (rev 716)
@@ -88,7 +88,7 @@
         die('Mail domain not found') unless($domain eq $main->get_config()->get_service("mailing")->{'default_domain'} ||
                             $dbh->do($sql, undef, $domain, $group->get_gid) > 0);
 
-        my $parent = Vhffs::Object::create($main, $user->get_uid, $description, undef, Vhffs::Constants::TYPE_ML);
+        my $parent = Vhffs::Object::create($main, $user->get_uid, $group->get_gid, $description, undef, Vhffs::Constants::TYPE_ML);
         die('Unable to create parent object') unless(defined $parent);
 
 	# open sub, post members only
@@ -139,7 +139,7 @@
 sub _new {
     my ($class, $main, $ml_id, $local_part, $domain, $prefix, $owner_gid, $admin, $open_archive, $reply_to, $sub_ctrl, $post_ctrl, $signature, $oid, $owner_uid, $date_creation, $state, $description, $subs) = @_;
 
-    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $date_creation, $description, $state, Vhffs::Constants::TYPE_ML);
+    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $owner_gid, $date_creation, $description, $state, Vhffs::Constants::TYPE_ML);
     return undef unless defined($self);
 
     $self->{ml_id} = $ml_id;

Modified: trunk/vhffs-api/src/Vhffs/Services/Mysql.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Services/Mysql.pm	2007-07-12 11:49:12 UTC (rev 715)
+++ trunk/vhffs-api/src/Vhffs/Services/Mysql.pm	2007-07-12 12:34:00 UTC (rev 716)
@@ -123,7 +123,7 @@
 
     eval {
 
-        my $parent = Vhffs::Object::create($main, $user->get_uid, $description, undef, Vhffs::Constants::TYPE_MYSQL);
+        my $parent = Vhffs::Object::create($main, $user->get_uid, $group->get_gid, $description, undef, Vhffs::Constants::TYPE_MYSQL);
         die('Unable to create parent object') unless defined ($parent);
 
         my $sql = 'INSERT INTO vhffs_mysql(dbname, dbuser, dbpass, owner_uid, owner_gid, object_id) VALUES(?, ?, ?, ?, ?, ?)';
@@ -239,7 +239,7 @@
 
 sub _new {
     my ($class, $main, $mysql_id, $owner_gid, $dbname, $dbuser, $dbpass, $oid, $owner_uid, $date_creation, $state, $description) = @_;
-    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $date_creation, $description, $state, Vhffs::Constants::TYPE_MYSQL);
+    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $owner_gid, $date_creation, $description, $state, Vhffs::Constants::TYPE_MYSQL);
     return undef unless(defined $self);
 
     $self->{mysql_id} = $mysql_id;

Modified: trunk/vhffs-api/src/Vhffs/Services/Postgres.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Services/Postgres.pm	2007-07-12 11:49:12 UTC (rev 715)
+++ trunk/vhffs-api/src/Vhffs/Services/Postgres.pm	2007-07-12 12:34:00 UTC (rev 716)
@@ -137,7 +137,7 @@
 
     eval {
 
-        my $parent = Vhffs::Object::create($main, $user->get_uid, $description, undef, Vhffs::Constants::TYPE_PGSQL);
+        my $parent = Vhffs::Object::create($main, $user->get_uid, $group->get_gid, $description, undef, Vhffs::Constants::TYPE_PGSQL);
         die('Unable to create parent object') unless defined ($parent);
 
         my $sql = 'INSERT INTO vhffs_pgsql(dbname, dbuser, dbpass, owner_uid, owner_gid, object_id) VALUES(?, ?, ?, ?, ?, ?)';
@@ -250,7 +250,7 @@
 
 sub _new {
     my ($class, $main, $pgsql_id, $owner_gid, $dbname, $dbuser, $dbpass, $oid, $owner_uid, $date_creation, $state, $description) = @_;
-    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $date_creation, $description, $state, Vhffs::Constants::TYPE_PGSQL);
+    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $owner_gid, $date_creation, $description, $state, Vhffs::Constants::TYPE_PGSQL);
     return undef unless(defined $self);
 
     $self->{pgsql_id} = $pgsql_id;

Modified: trunk/vhffs-api/src/Vhffs/Services/Repository.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Services/Repository.pm	2007-07-12 11:49:12 UTC (rev 715)
+++ trunk/vhffs-api/src/Vhffs/Services/Repository.pm	2007-07-12 12:34:00 UTC (rev 716)
@@ -99,7 +99,7 @@
     $dbh->begin_work;
 
     eval {
-        my $parent = Vhffs::Object::create($main, $user->get_uid, $description, undef, Vhffs::Constants::TYPE_REPOSITORY);
+        my $parent = Vhffs::Object::create($main, $user->get_uid, $group->get_gid, $description, undef, Vhffs::Constants::TYPE_REPOSITORY);
         die('Unable to create parent object') unless(defined $parent);
 
         my $sql = 'INSERT INTO vhffs_repository(name, owner_uid, owner_gid, quota, quota_used, object_id) VALUES(?, ?, ?, ?, 0, ?)';
@@ -151,7 +151,7 @@
 sub _new {
     my ($class, $main, $repository_id, $name, $owner_uid, $owner_gid, $quota, $quota_used, $oid, $date_creation, $description, $state) = @_;
 
-    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $date_creation, $description, $state, Vhffs::Constants::TYPE_REPOSITORY);
+    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $owner_gid, $date_creation, $description, $state, Vhffs::Constants::TYPE_REPOSITORY);
     return undef unless(defined $self);
 
     $self->{repository_id} = $repository_id;

Modified: trunk/vhffs-api/src/Vhffs/Services/Svn.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Services/Svn.pm	2007-07-12 11:49:12 UTC (rev 715)
+++ trunk/vhffs-api/src/Vhffs/Services/Svn.pm	2007-07-12 12:34:00 UTC (rev 716)
@@ -76,7 +76,7 @@
     $dbh->begin_work;
 
     eval {
-        my $parent = Vhffs::Object::create($main, $user->get_uid, $description, undef, Vhffs::Constants::TYPE_SVN);
+        my $parent = Vhffs::Object::create($main, $user->get_uid, $group->get_gid, $description, undef, Vhffs::Constants::TYPE_SVN);
 
         die('Unable to create parent object') unless(defined $parent);
 
@@ -114,7 +114,7 @@
 {
     my ($class, $main, $svn_id, $reponame, $owner_uid, $owner_gid, $public, $ml_name, $oid, $date_creation, $description, $state) = @_;
 
-    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $date_creation, $description, $state, Vhffs::Constants::TYPE_SVN);
+    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $owner_gid, $date_creation, $description, $state, Vhffs::Constants::TYPE_SVN);
     return undef unless(defined $self);
 
     $self->{svn_id} = $svn_id;

Modified: trunk/vhffs-api/src/Vhffs/User.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/User.pm	2007-07-12 11:49:12 UTC (rev 715)
+++ trunk/vhffs-api/src/Vhffs/User.pm	2007-07-12 12:34:00 UTC (rev 716)
@@ -87,7 +87,7 @@
 
 sub _new {
     my ($class, $main, $uid, $gid, $oid, $username, $passwd, $homedir, $shell, $admin, $firstname, $lastname, $address, $zipcode, $city, $country, $mail, $gpg_key, $note, $language, $theme, $date_creation, $description, $state) = @_;
-    my $self = $class->SUPER::_new($main, $oid, $uid, undef, $date_creation, $description, $state, Vhffs::Constants::TYPE_USER);
+    my $self = $class->SUPER::_new($main, $oid, $uid, $gid, $date_creation, $description, $state, Vhffs::Constants::TYPE_USER);
     return undef unless(defined $self);
     $self->{uid} = $uid;
     $self->{gid} = $gid;


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