Project

General

Profile

Remove secondary project owners

Added by Bob Grassucci almost 8 years ago

Is there a way to remove project owners once they have been added? Some of our new users get started allowing more senior users to see their project and later either one of them do not want to see the others projects. It is mostly that the more senior users have many projects going and want to simplify their viewing. Another option could be to organize the projects where you are the primary owner of a project which you see first and then secondary projects would show up later or view optionally. Whichever is easier. Thanks.
Bob


Replies (3)

RE: Remove secondary project owners - Added by Anchi Cheng almost 8 years ago

A long time ago this feature was available from myamiweb and then we commented it off due to one hiccup.

See below difference to uncomment it. I also attached the modified files for 3.2 for you since the version repository is locked at the moment. I will put the feature back on the next version

--- a/myamiweb/project/inc/project.inc.php
+++ b/myamiweb/project/inc/project.inc.php
@@ -418,7 +418,7 @@ class project {
                        $q = "DELETE FROM projectowners " 
                                ."WHERE `REF|leginondata|UserData|user` = ".$userId." " 
                                ."and `REF|projects|project`= ".$projectId." ";
-                       #$this->mysql->SQLQuery($q, true);
+                       $this->mysql->SQLQuery($q, true);
                }
                return true;
        }
diff --git a/myamiweb/project/shareproject.php b/myamiweb/project/shareproject.php
index 0d0d135..22ad2c5 100644
--- a/myamiweb/project/shareproject.php
+++ b/myamiweb/project/shareproject.php
@@ -99,7 +99,7 @@ to <a class="header" href="<? echo BASE_URL.'user.php'; ?>">[user]</a> to update
        $owners = $project->getProjectOwners($projectId);
        echo "<br>";
        echo "Project owned by: <br>";
-#      $bt_del = "<input class='bt1' type='submit' name='bt' value='del'>";
+       $bt_del = "<input class='bt1' type='submit' name='bt' value='del'>";
        echo "<table>";
        if ($owners) {
                foreach ($owners as $v) {
@@ -111,7 +111,7 @@ to <a class="header" href="<? echo BASE_URL.'user.php'; ?>">[user]</a> to update
                        echo "</td>";
                        if ($is_admin) {
                                echo "<td>";
-#                              echo $ck;
+                               echo $ck;
                                echo "</td>";
                        }
                        echo "</tr>";
@@ -119,7 +119,7 @@ to <a class="header" href="<? echo BASE_URL.'user.php'; ?>">[user]</a> to update
                echo "</table>";
                echo "<br>";
                if ($is_admin) {
-#                      echo "delete selected: ".$bt_del;
+                       echo "delete selected: ".$bt_del;^M
                }
        }
        echo "<pre>";
</pre>

RE: Remove secondary project owners - Added by Bob Grassucci almost 8 years ago

Thanks. That did the trick! What sort of hiccup should we be on the lookout for?
Bob

RE: Remove secondary project owners - Added by Anchi Cheng almost 8 years ago

We had a table corruption that we suspected came from one of the owner deletion. But in retrospect, there were occasional problem of similar nature after that time that was not related to such operation. Therefore, I no longer think it is related to it, and you should not see it.

    (1-3/3)