adrian15 | 16 Nov 21:42
Picon
Gravatar

Add basic template ownership patch

Hi phplist developers mailing list,

I have developed a patch to add basic template ownership to phplist.

I have opened a new mantis issue for that on: 
http://mantis.phplist.com/view.php?id=15366

I am going to attach here the diff file and copy and paste the 
instructions which both can be found here: 
http://adrian15.raulete.net/ficheros/phplist_template_ownership/ .

Before coding that a superadmin can change an admin template ownership I 
wanted to know your impression.

And as I have already said in the mantis issue (I copy and paste):

I am very interested in this patch becoming part of the official phplist.

So I am ready to correct it as many times as it is needed so that it 
fits the way that you want things to be coded or if it needs to be 
improved somehow or whatever.

I think I have done a great job because I have also coded the database 
upgrade part but it's up to you to judge my work so that we can improve 
it a lot better and add it to official phplist upstream code.

Thank you very much for your attention.

adrian15

(Continue reading)

Michiel Dethmers | 18 Nov 11:49
Picon
Favicon

Re: Add basic template ownership patch


Thanks for that. That sounds interesting. Once I have some time, I'll take a closer look and then will continue the discussion in the mantis issue.

Michiel



On 11/16/2009 06:42 PM, adrian15 wrote:
Hi phplist developers mailing list,

I have developed a patch to add basic template ownership to phplist.

I have opened a new mantis issue for that on: http://mantis.phplist.com/view.php?id=15366

I am going to attach here the diff file and copy and paste the instructions which both can be found here: http://adrian15.raulete.net/ficheros/phplist_template_ownership/ .

Before coding that a superadmin can change an admin template ownership I wanted to know your impression.

And as I have already said in the mantis issue (I copy and paste):

I am very interested in this patch becoming part of the official phplist.

So I am ready to correct it as many times as it is needed so that it fits the way that you want things to be coded or if it needs to be improved somehow or whatever.

I think I have done a great job because I have also coded the database upgrade part but it's up to you to judge my work so that we can improve it a lot better and add it to official phplist upstream code.


Thank you very much for your attention.

adrian15

Instructions:

This patch applies for phplist 2.10.10.

Here there are some generic instructions to apply it:

 Instructions

In any pc:

Save .diff file on phplist_patrones folder.
Save/Download phplist-2.10.10.tgz (Available at phplist.com webpage)

Inside phplist_patrones folder we make desde_cero folder.
mkdir desde_cero
We enter inside it and untar
cd desde_cero
tar xvzf ../phplist-2.10.10.tgz
Let's apply the patch
patch -p1 < ../phplist_basic_template_ownership_support.diff
We rename the folder :
mv phplist-2.10.10 phplist-2.10.11

We create another tgz file:
tar cvzf phplist-2.10.11.tgz phplist-2.10.11

Now we are going to be able to work with phplist-2.10.11.tgz file.

Now we go to the machine where we want to install or upgrade our new improved with template ownership support phplist.

Optional: With phpmyadmin or a similar tool we can make a database backup in order to recreate it if something fails.

Let's rename the folder /var/www/lists/ (where we can see admin,config,dl.php,... folders/files))and we rename it to lists_old (Do not remove it yet!).
mv /var/www/lists /var/www/lists_old

Let's untar phplist-2.10.11.tgz (Let's suppose that we have saved a copy in the /tmp folder)

cd /tmp
tar xvzf phplist-2.10.11.tgz
cp -r phplist-2.10.11/public_html/lists /var/www

Now we are going to recover our old config file:

cd /var/www/lists/config
cp ../../lists_old/config/config.php config.php

We visit:
http://url/lists/admin/

We login as a super admin (usually admin).

As we are requested we click "upgrade" link.
And we click on "here" link.

We should see: Information: Success

If we already had patterns we should assign them an admin in order to use them.

We can use phpmyadmin for this task. We will check admin table first.
In the admin table we can identify each one of the admin ids (We will use this data later).

We go to template table.

In each one of its rows we will edit the column adminid and we will set it to the id value that we had already seen in the admin table so that each template gets associated an admin.


Note: As you might think if you have too many data you can try to speed things with an appropiated SQL sentence.

Optional: Now it is safe to delete /var/www/lists_old/ but, as always, the best way of doing things is saving a copy of this folder, just in case.
And, of course, remove it from /var/www folder so that the folder cannot be accessed from outside the server.

And that's all.

_______________________________________________ Phplist-developers mailing list Phplist-developers <at> tincan.co.uk http://mail.tincan.co.uk/mailman/listinfo/phplist-developers
_______________________________________________
Phplist-developers mailing list
Phplist-developers <at> tincan.co.uk
http://mail.tincan.co.uk/mailman/listinfo/phplist-developers
adrian15 | 22 Nov 00:19
Picon
Gravatar

phplist 2.10.10 Initial patches

You will find attached a tar.gz with some patches that apply for the 
initial bugs found at 2.10.10 release.

I have taken them:

http://forums.phplist.com/viewtopic.php?f=9&t=24494&start=0

You might find useful them for making a 2.10.10 bugfix release or whatever.

Let's suppose we download and untar the phplist-2.10.10.tgz in 
src_original folder so that we can see inside it: phplist-2.10.10 folder.

Inside the same folder where src_original folder resides we untar the 
attached tar.gz. We will see two folders:

2.10.10_first_15_patchs
2.10.10_first_15_patchs_excluded

Excluded folder is patch number 3 which I have noticed that removes the 
accesscheck.php include and I do not like it.

So you can do something like that:
cd src_original/phplist-2.10.10
for ffile in ../../2.10.10_first_15_patchs/*patch ; do echo "patch -p2 <
$ffile;"; patch -p2 < $ffile; done

And that's it.

Echo command is there only for debugging issues but it is not needed at all.

About 10 patches have been download from the forum.
About 5 patches have been created manually.

However I have not tried all of these patches applied together yet.

Anyone wants to try and give me some feedback?

Whenever I have time I will update the forum thread with this 
information also so that normal people can bugfix 2.10.10 with 14 
initial patches easily.

adrian15
--

-- 
Support free software. Donate to Super Grub Disk. Apoya el software
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/index.php?pid=10

_______________________________________________
Phplist-developers mailing list
Phplist-developers <at> tincan.co.uk
http://mail.tincan.co.uk/mailman/listinfo/phplist-developers
adrian15 | 22 Nov 10:56
Picon
Gravatar

opensaas? and phplist

I am going to describe something that, first of all, I do not know if it 
exists, so if it does exist something similar please tell me because I 
am interested in it.

If it does not exist I hope that I can convince my entreprise to develop 
it and the first software that we will integrate will be phplist.

So we have two entities: opensaas and phplist.

Opensaas has inside it an phplist module.
And phplist has inside it an opensaas connector.

Opensaas is meant to be a panel control that uses both the opensaas 
owner (the entreprise that runs saas services based on open source) and 
the opensaas users (Other entreprises or users that want to use these 
services and, of course, the pay for them.)

Opensaas phplist module (OPM) is an interface that opensaas uses to 
"talk to" to phplist using the Opensaas API.

Phlist opensaas connector (POC) is a set of functions that are called 
from the phplist webpages in order to communicate to Opensaas (which 
actually they are talking to Opensaas phplist module). These function 
are defined using the Opensaas API.

Let's see an example.

An entreprise, let's call it lalocasa pays my saas entreprise so that 
they can have a maximum of 4 mailing lists.

They also ask us to have two admins in order to administrate the mailing 
list, let's call them, for the sake of simplicity, admin1 and admin2.

STEP 1
===========
USER: Saas owner (Seller)
WEB INTERFACE: Opensaas Control Panel

* Create LALOCASA entreprise. (No message is passed to POC.)
* Assign to LALOCASA entreprise 4 phplist mailing lists. (No messages is 
passed to POC.)
* Create phplist mailing list administrators: admin1 and admin2 asigned 
to LALOCASA entreprise. (OPM tells the POC to create an admin which name 
is admin1. POC says is ok. OPM tells the POC to create an admin which 
name is admin2. POC says is ok.)
* Assign to LALOCASA entreprise 500 users per mailing list.

STEP 2
===========
USER: LALOCASA admin1
WEB INTERFACE: Phplist

* Create a new mailing list (1). (POC asks to OPM if admin1 can create a 
new mailing list. OPM replies yes.)
[Obviously 4 - 1 = 3. Either OPM asks POC for the total of mailing lists 
assigned to all the admins that are from LALOCASA or OPM has an internal 
count of them.]

* Add 300 users from csv to mailing list 1. (POC asks to OPM if admin1 
can add 300 users to its mailing list. OPM says is ok.)
* Add 250 users from csv to mailing list 1. (POC asks to OPM if admin1 
can add 300 users to its mailing list. OPM says NO. OPM also outputs the 
following message so that phplist can print it: "No more than 500 users 
are permitted by mailing list. This mailing list has 300 users. 300 + 
250 users = 550 users > 500 users")

* Create a new mailing list (2). (POC asks to OPM if admin1 can create a 
new mailing list. OPM replies yes.)

* Create a new mailing list (3). (POC asks to OPM if admin1 can create a 
new mailing list. OPM replies yes.)

* Create a new mailing list (4). (POC asks to OPM if admin1 can create a 
new mailing list. OPM replies yes.)

STEP 3
===========
USER: LALOCASA admin2
WEB INTERFACE: Phplist

* Create a new mailing list (5). (POC asks to OPM if admin2 can create a 
new mailing list. OPM replies NO.)
[Obviously there are 4 mailing lists assigned to LALOCASA entreprise 
administratrors from a total of 4 allowed. Either OPM asks POC for the 
total of mailing lists assigned to all the admins that are from LALOCASA 
or OPM has an internal count of them.]

So POC needs to make available the following functions to OPM:
- Create an administrator
- Number of mailing lists assigned to a set of users
- Number of users subscribed to a mailing list

And OPM needs to make available the following functions to POC:
- [Boolean, String(Reason)] CanAdminCreateList (adminid)
- [Boolean, String(Reason)] CanAdminAddtoListUsers (adminid, 
number_of_users_to_add)

Well, that's from the phplist point of view, obviosuly, opensaas should 
be powerful enough to connect to an accounting program that keeps 
tracking of entreprise payments and so on.

But that's another history.

So... does anything similar to this, exist yet?

adrian15
--

-- 
Support free software. Donate to Super Grub Disk. Apoya el software
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/index.php?pid=10

_______________________________________________
Phplist-developers mailing list
Phplist-developers <at> tincan.co.uk
http://mail.tincan.co.uk/mailman/listinfo/phplist-developers

Michiel Dethmers | 23 Nov 12:44
Picon
Favicon

Re: phplist 2.10.10 Initial patches


that's great. Did you open a mantis issue for this? That would be useful, as emails often get lost in history.

Michiel

On 11/21/2009 09:19 PM, adrian15 wrote:
You will find attached a tar.gz with some patches that apply for the initial bugs found at 2.10.10 release.

I have taken them:

http://forums.phplist.com/viewtopic.php?f=9&t=24494&start=0

You might find useful them for making a 2.10.10 bugfix release or whatever.

Let's suppose we download and untar the phplist-2.10.10.tgz in src_original folder so that we can see inside it: phplist-2.10.10 folder.

Inside the same folder where src_original folder resides we untar the attached tar.gz. We will see two folders:

2.10.10_first_15_patchs
2.10.10_first_15_patchs_excluded

Excluded folder is patch number 3 which I have noticed that removes the accesscheck.php include and I do not like it.

So you can do something like that:
cd src_original/phplist-2.10.10
for ffile in ../../2.10.10_first_15_patchs/*patch ; do echo "patch -p2 <
$ffile;"; patch -p2 < $ffile; done

And that's it.

Echo command is there only for debugging issues but it is not needed at all.

About 10 patches have been download from the forum.
About 5 patches have been created manually.

However I have not tried all of these patches applied together yet.

Anyone wants to try and give me some feedback?

Whenever I have time I will update the forum thread with this information also so that normal people can bugfix 2.10.10 with 14 initial patches easily.

adrian15
_______________________________________________ Phplist-developers mailing list Phplist-developers <at> tincan.co.uk http://mail.tincan.co.uk/mailman/listinfo/phplist-developers
_______________________________________________
Phplist-developers mailing list
Phplist-developers <at> tincan.co.uk
http://mail.tincan.co.uk/mailman/listinfo/phplist-developers
adrian15 | 22 Nov 17:40
Picon
Gravatar

Re: Add basic template ownership patch

Michiel Dethmers escribió:
> 
> Thanks for that. That sounds interesting. Once I have some time, I'll 
> take a closer look and then will continue the discussion in the mantis 
> issue.
> 
> Michiel
> 

Thank you very much!

I attach an updated version of the patch that now works after applying 
the 15 patches that I have sent in a previous email.

At viewtemplate.php now when inserting the if clause I do not ident the 
lines inside it so it is ugly but it works.

What I mean is that there has not been any functional changes, it is a 
minor change so that the 15 patches apply.

You will the patch attached here and whenever I have time I will upload 
it to the mantis issue.

adrian15
-- 
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/index.php?pid=10
diff -urN src_original/phplist-2.10.10/public_html/lists/admin/connect.php src_admin_ownerswip2/phplist-2.10.10/public_html/lists/admin/connect.php
--- src_original/phplist-2.10.10/public_html/lists/admin/connect.php	2009-05-05
16:40:48.000000000 +0200
+++ src_admin_ownerswip2/phplist-2.10.10/public_html/lists/admin/connect.php	2009-11-15
18:17:59.000000000 +0100
@@ -11,7 +11,7 @@
 	$version = "dev";
 }

-define("VERSION","2.10.10");
+define("VERSION","2.10.11");

 include_once dirname(__FILE__) . "/commonlib/lib/userlib.php";
 include_once dirname(__FILE__) . "/pluginlib.php";
diff -urN src_original/phplist-2.10.10/public_html/lists/admin/lib.php src_admin_ownerswip2/phplist-2.10.10/public_html/lists/admin/lib.php
--- src_original/phplist-2.10.10/public_html/lists/admin/lib.php	2009-01-28
13:02:34.000000000 +0100
+++ src_admin_ownerswip2/phplist-2.10.10/public_html/lists/admin/lib.php	2009-11-15
22:24:36.000000000 +0100
@@ -378,7 +378,8 @@
   if (defined("IN_WEBBLER")) {
     $more = '&pi='.$_GET["pi"];
   }
-  $tmpl = Sql_Fetch_Row_Query(sprintf('select template from %s where id = %d',$tables["template"],$id));
+  $tmpl = Sql_Fetch_Row_Query(sprintf('select template from %s where ((id = %d) and (adminid = %d))',$tables["template"],$id,$adminid));
+  if ($tmpl) {
   $template = stripslashes($tmpl[0]);
   $img_req = Sql_Query(sprintf('select id,filename from %s where template = %d order by filename desc',$tables["templateimage"],$id));
   while ($img = Sql_Fetch_Array($img_req)) {
@@ -406,7 +407,10 @@
   $template = ereg_replace('<form','< form',$template);
   $template = ereg_replace('</form','< /form',$template);

-  return $template;
+  return $template; 
+  } else {
+  return FALSE;
+  }
 }

 
diff -urN src_original/phplist-2.10.10/public_html/lists/admin/send_core.php src_admin_ownerswip2/phplist-2.10.10/public_html/lists/admin/send_core.php
--- src_original/phplist-2.10.10/public_html/lists/admin/send_core.php	2009-03-26
18:18:23.000000000 +0100
+++ src_admin_ownerswip2/phplist-2.10.10/public_html/lists/admin/send_core.php	2009-11-15
23:02:20.000000000 +0100
@@ -1,7 +1,7 @@
 <?php
 // 2004-1-7  This function really isn't quite ready for register globals.
 require_once dirname(__FILE__).'/accesscheck.php';
-
+$AdminID = $_SESSION["logindetails"]["id"]; // Required for admin-template-ownerswip support
 #initialisation###############

 // Verify that FCKeditor is available
@@ -1129,11 +1129,11 @@
   }
   $formatting_content .= '</td></tr>';

-  $req = Sql_Query("select id,title from {$tables["template"]} order by listorder");
+  $req = Sql_Query("select id,title from {$tables["template"]} where (adminid = $AdminID) order by listorder");
   if (Sql_affected_Rows()) {
     $formatting_content .= '<tr><td>'.Help("usetemplate").'
'.$GLOBALS['I18N']->get("usetemplate").': </td>
       <td><select name="template"><option value=0>-- '.$GLOBALS['I18N']->get("selectone").'</option>';
-    $req = Sql_Query("select id,title from {$tables["template"]} order by listorder");
+    $req = Sql_Query("select id,title from {$tables["template"]} where (adminid = $AdminID) order by listorder");
     while ($row = Sql_Fetch_Array($req)) {
       $formatting_content .= sprintf('<option value="%d" %s>%s</option>',$row["id"], $row["id"]==$_POST["template"]?'SELECTED':'',$row["title"]);
     }
diff -urN src_original/phplist-2.10.10/public_html/lists/admin/structure.php src_admin_ownerswip2/phplist-2.10.10/public_html/lists/admin/structure.php
--- src_original/phplist-2.10.10/public_html/lists/admin/structure.php	2009-05-05
16:40:48.000000000 +0200
+++ src_admin_ownerswip2/phplist-2.10.10/public_html/lists/admin/structure.php	2009-11-15
18:15:51.000000000 +0100
@@ -1,7 +1,7 @@
 <?php
 require_once dirname(__FILE__).'/accesscheck.php';

-define("STRUCTUREVERSION","2.10.10");
+define("STRUCTUREVERSION","2.10.11");

 $DBstruct = array( # order of tables is essential for smooth upgrade
     "attribute" => array ( # attributes of a user or a message
@@ -220,7 +220,8 @@
         "title" => array("varchar(255) not null","Title"),
         "template" => array("longblob","The template"),
         "listorder" => array("integer",""),
-        "unique_1" => array("(title)","")
+	"adminid" => array("integer",""),
+	"unique_1" => array("(title,adminid)",""),
     ),
     "templateimage" => array(
         "id" => array("integer not null primary key auto_increment","ID"),
diff -urN src_original/phplist-2.10.10/public_html/lists/admin/template.php src_admin_ownerswip2/phplist-2.10.10/public_html/lists/admin/template.php
--- src_original/phplist-2.10.10/public_html/lists/admin/template.php	2007-08-21
21:26:05.000000000 +0200
+++ src_admin_ownerswip2/phplist-2.10.10/public_html/lists/admin/template.php	2009-11-15
22:01:42.000000000 +0100
@@ -3,6 +3,7 @@
 <?php
 require_once dirname(__FILE__).'/accesscheck.php';

+$AdminID = $_SESSION["logindetails"]["id"]; // Required for admin-template-ownerswip support
 if (!empty($_FILES['file_template']) &&
is_uploaded_file($_FILES['file_template']['tmp_name'])) {
   $content = file_get_contents($_FILES['file_template']['tmp_name']);
 } elseif (isset($_POST['content'])) {
@@ -136,7 +137,7 @@
   }
   if ($templateok) {
     if (!$id) {
-      Sql_Query("insert into {$tables["template"]} (title) values(\"$title\")");
+      Sql_Query("insert into {$tables["template"]} (title,adminid) values(\"$title\",$AdminID)");
       $id = Sql_Insert_id();
     }
     Sql_Query(sprintf('update %s set title = "%s",template = "%s" where id = %d',
@@ -178,8 +179,13 @@
   }
 } else {
   if ($id) {
-    $req = Sql_Query("select * from {$tables["template"]} where id = $id");
+    // Check edited id ownership
+    $req = Sql_Query("select * from {$tables["template"]} where ((adminid = $AdminID) and (id = $id))"  );
+    if (!Sql_Affected_Rows()) {
+      $id=0;
+    } else {
     $data = Sql_Fetch_Array($req);
+    }
   }
 }
 ?>
diff -urN src_original/phplist-2.10.10/public_html/lists/admin/templates.php src_admin_ownerswip2/phplist-2.10.10/public_html/lists/admin/templates.php
--- src_original/phplist-2.10.10/public_html/lists/admin/templates.php	2005-08-03
04:37:10.000000000 +0200
+++ src_admin_ownerswip2/phplist-2.10.10/public_html/lists/admin/templates.php	2009-11-15
19:20:41.000000000 +0100
@@ -1,13 +1,21 @@
 <?php
 require_once dirname(__FILE__).'/accesscheck.php';
 
+$AdminID = $_SESSION["logindetails"]["id"]; // Required for admin-template-ownerswip support
+
 if (isset($_GET['delete'])) {
   # delete the index in delete
   $delete = sprintf('%d',$_GET['delete']);
-  print $GLOBALS['I18N']->get('Deleting')." $delete ...\n";
-  $result = Sql_query("delete from ".$tables["template"]." where id = $delete");
-  $result = Sql_query("delete from ".$tables["templateimage"]." where template = $delete");
-  print "... ".$GLOBALS['I18N']->get('Done')."<br /><hr /><br />\n";
+  print $GLOBALS['I18N']->get('Checking')." $delete ...\n";
+  $req = Sql_Query("select * from {$tables["template"]} where ((adminid = $AdminID) and (id = $delete))" 
);  
+  if (!Sql_Affected_Rows()) {
+    print '<p class="error">'.$GLOBALS['I18N']->get("You do not have enough permissions to delete this template.").'</p>';
+  } else {
+    print $GLOBALS['I18N']->get('Deleting')." $delete ...\n";
+    $result = Sql_query("delete from ".$tables["template"]." where id = $delete");
+    $result = Sql_query("delete from ".$tables["templateimage"]." where template = $delete");
+    print "... ".$GLOBALS['I18N']->get('Done')."<br /><hr /><br />\n";
+  }
 }
 if (isset($_POST['defaulttemplate'])) {
   saveConfig('defaultmessagetemplate',sprintf('%d',$_POST['defaulttemplate']));
@@ -19,8 +27,7 @@
 
 
 <?php
-
-$req = Sql_Query("select * from {$tables["template"]} order by listorder");
+$req = Sql_Query("select * from {$tables["template"]} where (adminid = $AdminID) order by listorder");
 if (!Sql_Affected_Rows())
   print '<p class="error">'.$GLOBALS['I18N']->get("No template have been defined").'</p>';
 
diff -urN src_original/phplist-2.10.10/public_html/lists/admin/upgrade.php src_admin_ownerswip2/phplist-2.10.10/public_html/lists/admin/upgrade.php
--- src_original/phplist-2.10.10/public_html/lists/admin/upgrade.php	2007-07-16
20:09:37.000000000 +0200
+++ src_admin_ownerswip2/phplist-2.10.10/public_html/lists/admin/upgrade.php	2009-11-15
18:32:45.000000000 +0100
@@ -345,6 +345,14 @@
   }
   Sql_Query(sprintf('delete from %s where page = "all" or page = "none"',$GLOBALS['tables']['task']));

+  switch ($dbversion) {
+      case "2.10.10":
+	Sql_Query(sprintf('alter table %s DROP INDEX title',$tables["template"]));
+	Sql_Query(sprintf('alter table %s ADD adminid INT',$tables["template"]));
+	Sql_Query(sprintf('alter table %s ADD unique (title,adminid)',$tables["template"]));
+        break;
+  }
+
   # mark the database to be our current version
   if ($success) {
     SaveConfig("version",VERSION,0);
diff -urN src_original/phplist-2.10.10/public_html/lists/admin/viewtemplate.php src_admin_ownerswip2/phplist-2.10.10/public_html/lists/admin/viewtemplate.php
--- src_original/phplist-2.10.10/public_html/lists/admin/viewtemplate.php	2005-08-03
04:37:10.000000000 +0200
+++
src_admin_ownerswip2/phplist-2.10.10/public_html/lists/admin/viewtemplate.php	2009-11-22
16:57:51.000000000 +0100
@@ -1,6 +1,11 @@
 <?php
 # view template
 require_once dirname(__FILE__).'/accesscheck.php';
+$AdminID = $_SESSION["logindetails"]["id"]; // Required for admin-template-ownerswip support
+
+// Check edited id ownership
+$req = Sql_Query("select * from {$tables["template"]} where ((adminid = $AdminID) and (id =
{$_GET["id"]}))"  );
+if (Sql_Affected_Rows()) {
 if ($_GET["pi"] && defined("IN_WEBBLER")) {
   $more = '&pi='.$_GET["pi"];
 }
@@ -14,5 +19,6 @@
   ob_end_clean();
   print previewTemplate($id,$_SESSION["logindetails"]["id"],nl2br($GLOBALS['I18N']->get('TempSample')));
 }
+} else print $GLOBALS['I18N']->get('You do not have enough permissions to view this template.');
 
 ?>
_______________________________________________
Phplist-developers mailing list
Phplist-developers <at> tincan.co.uk
http://mail.tincan.co.uk/mailman/listinfo/phplist-developers
adrian15 | 23 Nov 17:11
Picon
Gravatar

Re: phplist 2.10.10 Initial patches

Michiel Dethmers escribió:
> 
> that's great. Did you open a mantis issue for this? That would be 
> useful, as emails often get lost in history.

I didn't but I have just opened it. Here you are: 
http://mantis.phplist.com/view.php?id=15369

I have put "severity major" because there are old known bugs but I might 
be wrong with that so please change it if you think it should be changed.

adrian15
> 
> Michiel
> 
> On 11/21/2009 09:19 PM, adrian15 wrote:
>> You will find attached a tar.gz with some patches that apply for the 
>> initial bugs found at 2.10.10 release.
--

-- 
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/index.php?pid=10
_______________________________________________
Phplist-developers mailing list
Phplist-developers <at> tincan.co.uk
http://mail.tincan.co.uk/mailman/listinfo/phplist-developers

Michiel Dethmers | 23 Nov 17:02
Picon
Favicon

Re: opensaas? and phplist


Interesting idea. There does seem to be some opensaas initiative. Are 
you referring to that one, or did you mean it more in a general kind of way.

You'd have to figure out the resources for something like that. 
Currently we're already stretched with phpList as it is.

Michiel

On 11/22/2009 07:56 AM, adrian15 wrote:
> I am going to describe something that, first of all, I do not know if 
> it exists, so if it does exist something similar please tell me 
> because I am interested in it.
>
> If it does not exist I hope that I can convince my entreprise to 
> develop it and the first software that we will integrate will be phplist.
>
> So we have two entities: opensaas and phplist.
>
> Opensaas has inside it an phplist module.
> And phplist has inside it an opensaas connector.
>
> Opensaas is meant to be a panel control that uses both the opensaas 
> owner (the entreprise that runs saas services based on open source) 
> and the opensaas users (Other entreprises or users that want to use 
> these services and, of course, the pay for them.)
>
> Opensaas phplist module (OPM) is an interface that opensaas uses to 
> "talk to" to phplist using the Opensaas API.
>
> Phlist opensaas connector (POC) is a set of functions that are called 
> from the phplist webpages in order to communicate to Opensaas (which 
> actually they are talking to Opensaas phplist module). These function 
> are defined using the Opensaas API.
>
> Let's see an example.
>
> An entreprise, let's call it lalocasa pays my saas entreprise so that 
> they can have a maximum of 4 mailing lists.
>
> They also ask us to have two admins in order to administrate the 
> mailing list, let's call them, for the sake of simplicity, admin1 and 
> admin2.
>
> STEP 1
> ===========
> USER: Saas owner (Seller)
> WEB INTERFACE: Opensaas Control Panel
>
> * Create LALOCASA entreprise. (No message is passed to POC.)
> * Assign to LALOCASA entreprise 4 phplist mailing lists. (No messages 
> is passed to POC.)
> * Create phplist mailing list administrators: admin1 and admin2 
> asigned to LALOCASA entreprise. (OPM tells the POC to create an admin 
> which name is admin1. POC says is ok. OPM tells the POC to create an 
> admin which name is admin2. POC says is ok.)
> * Assign to LALOCASA entreprise 500 users per mailing list.
>
> STEP 2
> ===========
> USER: LALOCASA admin1
> WEB INTERFACE: Phplist
>
> * Create a new mailing list (1). (POC asks to OPM if admin1 can create 
> a new mailing list. OPM replies yes.)
> [Obviously 4 - 1 = 3. Either OPM asks POC for the total of mailing 
> lists assigned to all the admins that are from LALOCASA or OPM has an 
> internal count of them.]
>
> * Add 300 users from csv to mailing list 1. (POC asks to OPM if admin1 
> can add 300 users to its mailing list. OPM says is ok.)
> * Add 250 users from csv to mailing list 1. (POC asks to OPM if admin1 
> can add 300 users to its mailing list. OPM says NO. OPM also outputs 
> the following message so that phplist can print it: "No more than 500 
> users are permitted by mailing list. This mailing list has 300 users. 
> 300 + 250 users = 550 users > 500 users")
>
> * Create a new mailing list (2). (POC asks to OPM if admin1 can create 
> a new mailing list. OPM replies yes.)
>
>
> * Create a new mailing list (3). (POC asks to OPM if admin1 can create 
> a new mailing list. OPM replies yes.)
>
>
> * Create a new mailing list (4). (POC asks to OPM if admin1 can create 
> a new mailing list. OPM replies yes.)
>
>
> STEP 3
> ===========
> USER: LALOCASA admin2
> WEB INTERFACE: Phplist
>
> * Create a new mailing list (5). (POC asks to OPM if admin2 can create 
> a new mailing list. OPM replies NO.)
> [Obviously there are 4 mailing lists assigned to LALOCASA entreprise 
> administratrors from a total of 4 allowed. Either OPM asks POC for the 
> total of mailing lists assigned to all the admins that are from 
> LALOCASA or OPM has an internal count of them.]
>
> So POC needs to make available the following functions to OPM:
> - Create an administrator
> - Number of mailing lists assigned to a set of users
> - Number of users subscribed to a mailing list
>
> And OPM needs to make available the following functions to POC:
> - [Boolean, String(Reason)] CanAdminCreateList (adminid)
> - [Boolean, String(Reason)] CanAdminAddtoListUsers (adminid, 
> number_of_users_to_add)
>
>
> Well, that's from the phplist point of view, obviosuly, opensaas 
> should be powerful enough to connect to an accounting program that 
> keeps tracking of entreprise payments and so on.
>
> But that's another history.
>
> So... does anything similar to this, exist yet?
>
> adrian15
_______________________________________________
Phplist-developers mailing list
Phplist-developers <at> tincan.co.uk
http://mail.tincan.co.uk/mailman/listinfo/phplist-developers

adrian15 | 23 Nov 19:11
Picon
Gravatar

Re: opensaas? and phplist

Michiel Dethmers escribió:
> 
> Interesting idea. There does seem to be some opensaas initiative. Are 
> you referring to that one, or did you mean it more in a general kind of 
> way.
I have checked opensaas.org but there is not documentation at all. Just 
a program example that I do not understand too much.
> 
> You'd have to figure out the resources for something like that. 
> Currently we're already stretched with phpList as it is.

Well, yes, I mean, my first quick dirty approach is to define an 
opensaas folder which might be found inside lists folder.

These opensaas folder will have defined the functions:
[Boolean, String(Reason)] CanAdminCreateList (adminid)
- [Boolean, String(Reason)] CanAdminAddtoListUsers (adminid, 
number_of_users_to_add)

to reply always true.

This way you can have a phplist as it is right now without too much pain 
I think.

You just have to change the opensaas path variable somewhere so that 
instead of pointing to lists/opensaas it points to another place and 
that's it.

What do you think about this approach?

adrian15
--

-- 
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/index.php?pid=10
_______________________________________________
Phplist-developers mailing list
Phplist-developers <at> tincan.co.uk
http://mail.tincan.co.uk/mailman/listinfo/phplist-developers

adrian15 | 23 Nov 20:21
Picon
Gravatar

admin password encryption patch for 2.10.10?

I have checked that Claudio (chdelgado) has already worked on this:
http://mantis.phplist.com/view.php?id=12822

I was asking myself if there was a patch for this features that can be 
applied to 2.10.10, or maybe, needs some minimal editing in order to be 
applied to 2.10.10?

As you can imagine from my older post I am trying to set up a fixed 
phplist 2.10.10 version in production state and I think the only 
remaining piece that it is not solved it is the admin password encryption.

Thank you very much for your attention.

adrian15
--

-- 
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/index.php?pid=10
_______________________________________________
Phplist-developers mailing list
Phplist-developers <at> tincan.co.uk
http://mail.tincan.co.uk/mailman/listinfo/phplist-developers


Gmane