changes to git management links based on perms
[gwvp.git] / gwvplib / gwvpdatabase.php
index 22db79c..acb1a7a 100644 (file)
@@ -754,6 +754,25 @@ function gwvp_IsGroupAdmin($groupname = null, $gid = null)
        return $return;
 }
 
+function gwvp_IsRepoOwner($userid, $repoid)
+{
+       $conn = gwvp_ConnectDB();
+       
+       $sql = "select repos_owner from repos where repos_id='$repoid'";
+       
+       $res = $conn->query($sql);
+       
+       $return = false;
+       foreach($res as $u_res) {
+               $return["owner"] = $u_res["repos_owner"];
+       }
+
+       if($return == false) return false;
+       if($return["owner"] == $userid) return true;
+       else return false;
+       
+       
+}
 
 function gwvp_IsUserAdmin($email=null, $username = null, $userid = null)
 {