githelper.git / githelper.pike

version» Context lines:

githelper.git/githelper.pike:602:    AccessLevel check_access(string ref_name, string user)    {    /* Return ACCESS_NONE (0) for no access,    * ACCESS_BASIC (1) for basic access, and    * ACCESS_FULL (2) for full access    * (including rebase/delete branch, and move/delete tag)    */    string shortref = ref_name;    sscanf(shortref, "refs/%*[^/]/%s", shortref);    foreach(groups; string group; AccessLevel ac) { -  if (has_prefix(shortref, group + "/")) +  if (has_prefix(shortref, group + "/")) { +  if (!ac) { +  write("Access to %s denied for user %s\n", ref_name, user); +  }    return ac;    } -  +  }    if (search(ref_name, "/x-") >= 0) {    write("The ref %s can only be modified by its owner\n", ref_name);    return ACCESS_NONE;    }    return ACCESS_BASIC;    }       int check_tag_push(string old_sha, string new_sha, string ref_name,    AccessLevel access_level)    {