 | |  | | | Classifieds Bug Reports Post any problems you may be having with Classifieds here. |
September 23rd, 2004, 01:00 PM
|
#1 (permalink)
| | Member Verified Customer
Join Date: Sep 2004
Posts: 50
| Admin log in problem
Atlast its installed and nearly working, the problem I have is that I was accessing admin, then logged in as another user and found too that they could get access to admin (NOT GOOD).....so I searched the forum and I've got the right permission settings in the pp_groups, but the group id was 3, so changed it too 6 and now registered users can't get admin access, but neither can I......where does it pick up the groupid 6 from in the Nuke database....
All help welcome
|
| |
September 23rd, 2004, 01:38 PM
|
#2 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,941
|
We dont use the Nuke usergroups for group access
We use the phpbb usergroups in Nuke Quote:
function import_user_groups() {
global $Globals, $db_link, $link;
if ( !empty($Globals['dprefix']) ) {
$grouptable="{$Globals['dprefix']}bbgroups";
}
else
$grouptable="bbgroups";
$query = "SELECT group_id,group_name FROM $grouptable WHERE group_type=2 OR group_single_user=0";
$readug = ppmysql_query($query, $db_link);
if ( !$readug ) {
diewell("Error: Are you certain that your database prefix is set properly?<p>I cannot see your
Nuke \"<b>$grouptable</b>\" table.<p>The prefix setting adds characters to the front of Nuke
table names - please doublecheck this.");
}
$rcount = mysql_num_rows($readug);
if ($rcount > 0) {
$deleteq = "DELETE FROM {$Globals['pp_db_prefix']}usergroups";
$resultd = ppmysql_query($deleteq, $link);
if ( file_exists( "usergroups-nuke.sql") ) {
$filearray = file( "usergroups-nuke.sql" );
while ( list($num, $query) = each($filearray) ) {
if ( $query != "" && !strstr($query, "CREATE") ) {
$query = str_replace( ";", "", $query);
$query = str_replace( "{\$pp_db_prefix}", $Globals['pp_db_prefix'], $query );
$setup = ppmysql_query($query, $link);
}
}
}
else {
diewell("usergroups-nuke.sql is missing.");
}
while ( list( $groupid, $title ) = mysql_fetch_row( $readug ) ) {
$title = addslashes( $title );
if ( $groupid == 2 ) {
$query = "REPLACE INTO {$Globals['pp_db_prefix']}usergroups (groupid,groupname,modaccess,cpaccess,uploads,comments,diskspace,uploadsize,editpho,editposts) VALUES($groupid,'$title','1','1','1','1','0','0','1','1')";
}
else {
$query = "REPLACE INTO {$Globals['pp_db_prefix']}usergroups (groupid,groupname,modaccess,cpaccess,uploads,comments,diskspace,uploadsize,editpho,editposts) VALUES($groupid,'$title','0','0','1','1','0','0','1','1')";
}
$setug = ppmysql_query($query, $link);
}
}
ppmysql_free_result( $readug );
}
function init_user_groups() {
global $link, $pp_db_prefix;
if ( file_exists( "usergroups-nuke.sql") ) {
$filearray = file( "usergroups-nuke.sql" );
while ( list($num, $query) = each($filearray) ) {
if ($query != "") {
$query = str_replace( ";", "", $query);
$query = str_replace( "{\$pp_db_prefix}", $pp_db_prefix, $query );
$setup = mysql_query($query,$link);
}
}
}
else {
diewell("usergroups-nuke.sql is missing.");
}
}
| There are only 3 usergroups or should be
INSERT INTO usergroups VALUES ('1','Anonymous','','','','','',0,0,0,0,0);
INSERT INTO usergroups VALUES ('2','Admin',1,1,1,'','',1,1,1,1,0);
INSERT INTO usergroups VALUES ('3','Regular Users','',1,1,'','',1,1,0,1,0);
If your missing one of those usergroups you can use one of these sql queries in phpmyadmin
|
| |
September 23rd, 2004, 05:43 PM
|
#3 (permalink)
| | Member Verified Customer
Join Date: Sep 2004
Posts: 50
|
Okay I've got end sorted so its only me that gets into admin, however within the phpbb usergroups in Nuke, you have group_id user_id user_pending, so I've got group id 6, 2 (which is me), 0
How do I give the registered members access, under group id 3, when I can only allocate one user_id
|
| |
September 23rd, 2004, 07:10 PM
|
#4 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,941
|
You should empty your usergroups table NOT DELETE IT and add the usergroups I posted above.
I have no idea how you get a usergroup of 6 2 0 as there is nothing in our code that does that unless you are modifying those numbers. We have users installing with Nuke and there have been no issues.
|
| |
September 23rd, 2004, 07:38 PM
|
#5 (permalink)
| | Member Verified Customer
Join Date: Sep 2004
Posts: 50
|
that table doesn't exist, I have nuke_bbgroups, nuke_bbuser_group and pp_usergroups which has the data you've given the insertion code for.
|
| |
September 23rd, 2004, 07:44 PM
|
#6 (permalink)
| | Member Verified Customer
Join Date: Sep 2004
Posts: 50
|
where is the colloration from the group table to the user list, this is what I can't understand in my mind, the only group table that gives you a user id is in the Table nuke_bbuser_group, which can give me direct access to admin, the only group columns in the user table are user_group_cp user_group_list_cp, but you don't find these columns in any of the group tables.
|
| |
September 23rd, 2004, 07:52 PM
|
#7 (permalink)
| | Member Verified Customer
Join Date: Sep 2004
Posts: 50
|
In the user table under user_group_cp user_group_list_cp, there are differing no's for me and the rest of the members are "2", while I have a different no and Anonymous has another, this to me should be where it takes the group data from.
|
| |
September 23rd, 2004, 08:22 PM
|
#8 (permalink)
| | Member Verified Customer
Join Date: Sep 2004
Posts: 50
|
going to bed...too knackered to read anymore code, I'm sure its coded right I just to need to understand where is not working right, I can post ad's all day long but members can't...I can smell the coffee ist so close ;-)
|
| |
September 23rd, 2004, 08:54 PM
|
#9 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,941
|
pp_usergroups is our groups table for permission
To let users post ads you need to be signed in as admin and edit the usergroup permissions within the classifieds admin area.
|
| |
September 24th, 2004, 02:50 AM
|
#10 (permalink)
| | Member Verified Customer
Join Date: Sep 2004
Posts: 50
|
This is the table for pp_usergroups
INSERT INTO pp_usergroups VALUES (1, 'Anonymous', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO pp_usergroups VALUES (2, 'members', 0, 1, 1, 0, 0, 1, 1, 1, 1, 0);
INSERT INTO pp_usergroups VALUES (6, 'Admin', 1, 1, 1, 0, 0, 1, 1, 1, 1, 0);
This is the table for bbuser_group
INSERT INTO nuke_bbuser_group VALUES (1, -1, 0); (Anonymous)
INSERT INTO nuke_bbuser_group VALUES (2, 0, 0); (members)
INSERT INTO nuke_bbuser_group VALUES (4, 181, 0);
INSERT INTO nuke_bbuser_group VALUES (5, 363, 0); INSERT INTO nuke_bbuser_group VALUES (6, 2, 0); (Admin/Me)
INSERT INTO nuke_bbuser_group VALUES (7, 634, 0);
This is the table for bbgroups
INSERT INTO nuke_bbgroups VALUES (1, 1, 'Anonymous', 'Personal User', 0, 1);
INSERT INTO nuke_bbgroups VALUES (6, 2, 'Admin', 'Moderator of this Forum', 6, 0);
INSERT INTO nuke_bbgroups VALUES (4, 1, '', 'Personal User', 0, 1);
INSERT INTO nuke_bbgroups VALUES (5, 1, '', 'Personal User', 0, 1);
INSERT INTO nuke_bbgroups VALUES (2, 2, 'Members', '', 2, 0);
Where is it wrong ?
|
| |
September 24th, 2004, 07:17 AM
|
#11 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,941
|
First we have nothing to do with nuke_bbuser_group
You need to add two more inserts Looks like there is some major alteration to your phpbb? Why is admin 6? the default is 3 and you have multple groups of the same thing?
INSERT INTO pp_usergroups VALUES (4, 'Personal User', 0, 1, 1, 0, 0, 1, 1, 1, 1, 0);
INSERT INTO pp_usergroups VALUES (5, 'Personal Users', 0, 1, 1, 0, 0, 1, 1, 1, 1, 0);
|
| |
September 24th, 2004, 08:03 AM
|
#12 (permalink)
| | Member Verified Customer
Join Date: Sep 2004
Posts: 50
|
You must have something to do with nuke_bbuser_group, because if I change the group id in pp_usergroups too 3 for admin, then I can't get access to admin as its still 6 in nuke_bbuser_group, under my username. But if I then change group id too 3 in the nuke_bbuser_group too 3 I'm back into admin.
This is why I can't understand why use nuke_bbuser_group to pull the access rights from as you can only specify certain members within that group not a whole group id.
I've inserted the two lines, but no difference only I can post ad's......
|
| |
September 24th, 2004, 08:05 AM
|
#13 (permalink)
| | Member Verified Customer
Join Date: Sep 2004
Posts: 50
|
now I've changed the nuke_bbgroups to the original version when installed and every top dick and harry can get access to admin...going backwards
|
| |
September 24th, 2004, 11:21 AM
|
#14 (permalink)
| | Member Verified Customer
Join Date: Sep 2004
Posts: 50
|
okay I've doing a little bit testing on this.....
I set the function so that you can only view ads if a registered member and logged out.
as a visitor I couldn't veiw the ad....okay that's fine
I can register in as another member not admin and see all ads, but what I don't have is the link at the top to post an advert.
I can log in properly as me and have access to admin
So how do we fix the part tha ensures a registered member can list an advert ?
|
| |
September 24th, 2004, 11:26 AM
|
#15 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,941
|
Your missing what I am saying. Your group id is got from bbuser_group but thats it
Your issue is your groups dont align. You have if you notice a usergroup 7 which has I assume 634 members. But there is not 7 usergroup
Try one more insert
INSERT INTO pp_usergroups VALUES (7, 'Additional Users', 0, 1, 1, 0, 0, 1, 1, 1, 1, 0)
Also know you need to double check usergroup permissions in photopost in the admin section to be sure specific usergroups have access to upload.
|
| |
September 27th, 2004, 07:34 AM
|
#16 (permalink)
| | Member Verified Customer
Join Date: Sep 2004
Posts: 50
|
Okay,
I've went through every combination on this and I'm left with this
# Quote:
# Dumping data for table `nuke_bbgroups`
#
INSERT INTO nuke_bbgroups VALUES (1, 1, 'Anonymous', 'Personal User', 0, 1);
INSERT INTO nuke_bbgroups VALUES (3, 2, 'Admin', 'Moderators of this Forum', 5, 0);
INSERT INTO nuke_bbgroups VALUES (2, 2, 'Registered', '', 0, 0);
#
# Dumping data for table `nuke_bbuser_group`
#
INSERT INTO nuke_bbuser_group VALUES (1, -1, 0);
INSERT INTO nuke_bbuser_group VALUES (2, 634, 0);
INSERT INTO nuke_bbuser_group VALUES (3, 2, 0);
#
# Dumping data for table `pp_usergroups`
#
INSERT INTO pp_usergroups VALUES (1, 'Anonymous', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO pp_usergroups VALUES (2, 'Registered', 0, 1, 1, 0, 0, 1, 1, 1, 0, 0);
INSERT INTO pp_usergroups VALUES (3, 'Admin', 1, 1, 1, 0, 0, 1, 1, 1, 0, 0);
| INSERT INTO nuke_bbuser_group VALUES (2, 634, 0); This was you Omegatron when I gave you access to admin.
Every tom dick and harry can get access to admin, having read through so many posts on this topic its clear that this is not a 100% accurate method....
1. How do I remove the admin link on the top menu in the coding ?
If I can remove this, then I can work on securing access to admin via a pop up box.
|
| |
September 27th, 2004, 08:07 AM
|
#17 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,941
|
At this point I dont know what more to say. You keep going back to tables I am not telling you to touch.
I have only instructed for you to add queries to pp_usergroups. Why do you insist on adding inserts into other tables. I suspect this is your entire issue.
Thus you have me going in circles here and I can't help you.
If you want to rectify your issue send me a login to your phpmyadmin and login to that
|
| |
September 27th, 2004, 09:19 AM
|
#18 (permalink)
| | Member Verified Customer
Join Date: Sep 2004
Posts: 50
|
PM'd details over, let me know when you done.....thanks
|
| |
September 27th, 2004, 10:20 AM
|
#19 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,941
|
Okay well your issue is simple
You set members mod access to your control panel like I thought.
However I do beleive in all your haste of harping on this bbuser_group table you have hosed your nuke install. Your Nuke_bbuser_group table only has 3 entries? Looks like you dumped it
|
| |
September 27th, 2004, 11:15 AM
|
#20 (permalink)
| | Member Verified Customer
Join Date: Sep 2004
Posts: 50
|
okay, do I need to do anything else now or should it all be working a treat
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 10:57 AM. | |