Admin user can't see user-created records

Discussion in 'General' started by wrd, May 3, 2007.

  1. wrd

    wrd New Member

    I created a test user, 'cg', and logged in as that user. I then created a new SOA and a new record. After saving, the 'cg' user can see and edit the new record.

    I logged out and logged back in as the admin user. I can see the SOA record in the list, but when I click on it, I get "You don't have the permission to view this record or this record does not exist!"

    The recor'ds sys_userid is 3, sys_groupid is 0, and sys_perm_user and sys_perm_group are both set to riud.

    Any thoughts?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    It should normally work with these permissions. I will have to check that. A workaround might be to define a group and make the admin and user members of this group. The group must be set as default group for the user, so every new record will be owned by the group too.
     
  3. sqlparrot

    sqlparrot New Member

    mydnsimport issue is how I fixed this..

    Greetings!

    I used mydnsimport to shove our dns1 into a mydns system. Using mydnsconfig was pretty easy -I had to hack the install a bit for my apache2 (Suse 10 Enterprise) but its working now.

    I also rec'd the "You do not have permission..." message. After double checking the db permissions for the backend login on the mydnsconfig site, and finding I really did do that part correctly, I went looking at the tables.

    Nothing stood out so I built a bogus entry in the system. Aha!

    In my SOA table -these columns were null on all auto-imports, but 1 on the bogus entry: sys_userid, sys_groupid

    Also in SOA table -these columns said, "riud": sys_permuser, sys_permgroup.

    I ran an update query that went something like this:

    UPDATE `mydns`.`soa`
    SET sys_userid = 1, sys_groupid = 1, sys_permuser = 'riud', sys_permgroup = 'riud';

    Tada! Now when I click on an imported SOA I can go browse the groups.

    A minor detail, but I bet someone has bumped into it and gotten frustrated.

    This could be why making groups and moving users works. It sets the ids whereas they may be null w/o this.

    A default value of 1 might be good on the table defs, then anything inserted will always drop into the admin group bucket... just don't forget the 'riud' as well!

    -Squawk Squawk

    -The SQLParrot
     
  4. sqlparrot

    sqlparrot New Member

    Followon with rr table

    The rr table also needs an update...

    UPDATE rr
    SET sys_userid = 1, sys_groupid = 1, sys_perm_user = 'riud', sys_perm_group = 'riud';

    This was discovered when I went to edit a record -after having fixed the SOA table -the RR table refused to let me edit entries. -Suspecting the same issue with the auto-import tool, I updated the table columns and it all is flyin' now.

    -The Parrot
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    The auto import tool is for a plain mydns database and not for mydnsconfig. Mydnsconfig uses some extra database column to store the permissions for the database records which have to be added after import as you did.
     

Share This Page