X-Git-Url: http://git.pjr.cc/?p=gwvp.git;a=blobdiff_plain;f=gwvplib%2Fgwvpgitcontrol.php;fp=gwvplib%2Fgwvpgitcontrol.php;h=7093812d595cb49d809a0db564d84bb71e0a964d;hp=d1b0699e68ee819290025f8e7d442bf6e75c52b3;hb=c968cf55b0f366830676c8555cf61e9765277e44;hpb=e8df3c10e12e4381cc07845a0f04e85f05c81f35
diff --git a/gwvplib/gwvpgitcontrol.php b/gwvplib/gwvpgitcontrol.php
index d1b0699..7093812 100644
--- a/gwvplib/gwvpgitcontrol.php
+++ b/gwvplib/gwvpgitcontrol.php
@@ -4,6 +4,7 @@ $CALL_ME_FUNCTIONS["gitcontrol"] = "gwvp_gitControlCallMe";
//$MENU_ITEMS["20repos"]["text"] = "Repo Admin";
//$MENU_ITEMS["20repos"]["link"] = "$BASE_URL/admin/repos";
+$HOME_PAGE_PROVIDERS["gitlog"] = "gwvp_GitLogProvider";
function gwvp_gitControlCallMe()
{
@@ -22,6 +23,11 @@ function gwvp_gitControlCallMe()
}
+function gwvp_GitLogProvider()
+{
+ echo "
gitload provider loaded on homepage
";
+}
+
function gwvp_repoPermissionCheck($repo, $user)
{
return true;
@@ -159,6 +165,15 @@ function gwvp_gitBackendInterface()
}
}
+function gwvp_canManageRepo($userid, $repoid)
+{
+ // only the owner or an admin can do these tasks
+ error_log("Checking repoid, $repoid against userid $userid");
+
+ if(gwvp_IsUserAdmin(null, null, $userid)) return true;
+ if(gwvp_IsRepoOwner($userid, $repoid)) return true;
+ return false;
+}
function gwvp_callGitBackend($repo)
{