Menu

#3 User cannot add a record

open
nobody
None
5
2005-12-28
2005-12-28
Anonymous
No

Hi!

A very nice interface to maintain the Power DNS!
If a User have the right “Edit own domains“ he is not
able to add new records. Maybe there ie a way to
change this.

Best regards Tom Carpenter

Discussion

  • Sebastien Luttringer

    Logged In: YES
    user_id=2015665
    Originator: NO

    You can use this patch to fix this problem.

    --- /tmp/powerdnsadmin-0.4/new_record.php 2005-03-24 18:44:51.000000000 +0100
    +++ powerdnsadmin/new_record.php 2008-02-21 14:15:18.000000000 +0100
    @@ -21,10 +21,11 @@
    <h3>Edit domain &raquo; new record</h3>
    <?php

    -// $dbh = db_connect();
    - $result = $dbh->query("SELECT domain_owners.user_id, domains.name FROM domains, domain_owners WHERE domain_owners.domain_id = '$zoneid' AND domains.id = domain_owners.domain_id");
    + $result = $dbh->query("SELECT domains.name FROM domains WHERE domains.id = '$zoneid'");
    if (!$dbh->isError($result) && $result->numRows()) {

    + $result = $dbh->query("SELECT domain_owners.user_id, domains.name FROM domains JOIN domain_owners ON domains.id = domain_owners.domain_id WHERE domain_owners.domain_id = '$zoneid' AND domain_owners.user_id = '". $_SESSION["_UID"]. "'");
    +
    $row = $result->fetchRow();
    if ($perms["edit_other"] or ($perms["edit_own"] and $row["user_id"] == $_SESSION["_UID"])) {

     
  • Nobody/Anonymous

    This bug is tied to a previous bug where you only one one person to be granted access to the domain.

     

Log in to post a comment.