forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 bridging => Topic started by: ask on February 19, 2007, 01:40:17 pm
-
Hi
I have seen this question asked before, and followed the directions - but it does not seem to work!
I have coppermine V 1.4.10 installed and bridged to PhpBB v.2.0.22 and all (almost) seem to be working fine!
I wanted a group from the forum to be able to create and manage albums, and as this is not possible for non-admins i created a group in the forum for this.
The groups ID (according to the datebase) is 19. To give admin-rights to this added ", 19" to the admingroups as followes:
// Group ids - admin and guest only.
$this->admingroups = array(2, 19);
$this->guestgroup = 3;
to phpbb2018.inc.php
After this i ran the bridge-manager again to force the update and opened the groups-manager to do the same.
This does however not seem to have any effect - users that is members of the group with ID 19 does not get admin-rights (or the admin-menu-panel) does not appear!
Any suggestions?
Regard
Jacob Ask
-
Sorry - forgot to add some info:
Gallery: http://www.dgihavkajak.dk/galleri
forum: http://www.dgihavkajak.dk/forum
user: temp
pass: 1234
-
No suggestions at all?
regards
Jacob Ask
-
I'm also interested in setting a group to admin status without giving them admin status in the forum. I tried looking in the database but setting has_admin_access in the table cpg1410_usergroups doesn't seem to do anything. Anyone have any ideas?
-
Should work this way.
-
Anything I could have missed?
I tried this using two different groups, but with no result.
regards
Jacob Ask
-
Is the temp user in group 19? Enable debug mode.
-
nope, the temp user is not in group 19, as this would/should give the user admin rights in the gallery...
regards
Jacob Ask
-
Debug mode gives the following when I log in with the user that should get admin-rights:
USER:
------------------
Array
(
[ID] => b261a8f1f6e383017474f187dea2a403
[am] => 1
[lang] => danish
[liv] => Array
(
[0] => 6
)
)
==========================
USER DATA:
------------------
Array
(
[user_id] => 15
[user_name] => jacobask
[groups] => Array
(
[0] => 2
[1] => 119
)
[disk_max] => 20000
[disk_min] => 0
[can_rate_pictures] => 1
[can_send_ecards] => 1
[ufc_max] => 3
[ufc_min] => 3
[custom_user_upload] => 1
[num_file_upload] => 5
[num_URI_upload] => 3
[can_post_comments] => 1
[can_upload_pictures] => 1
[can_create_albums] => 0
[has_admin_access] => 0
[pub_upl_need_approval] => 0
[priv_upl_need_approval] => 0
[group_name] => Registered
[upload_form_config] => 3
[group_quota] => 0
[can_see_all_albums] => 0
[group_id] => 2
)
==========================
Queries:
------------------
Array
(
[0] => SELECT extension, mime, content, player FROM cpg1410_filetypes; (0s)
[1] => select * from cpg1410_plugins order by priority asc; (0s)
[2] => SELECT * FROM cpg1410_bridge (0s)
[3] => SELECT u.user_id AS user_id, u.user_password AS password, u.user_level FROM `dgihavkajak_dk`.phpbb_users AS u, `dgihavkajak_dk`.phpbb_sessions AS s WHERE u.user_id=s.session_user_id AND s.session_id = '962c379c1af46d02fbbaa302917f0432' AND u.user_id > 0 (0.001s)
[4] => SELECT u.user_id AS id, u.username AS username, u.user_password AS password, ug.group_id AS group_id FROM `dgihavkajak_dk`.phpbb_users AS u, `dgihavkajak_dk`.phpbb_user_group AS ug WHERE u.user_id=ug.user_id AND u.user_id='15' (0.001s)
[5] => SELECT ug.group_id+100 AS group_id FROM `dgihavkajak_dk`.phpbb_users AS u, `dgihavkajak_dk`.phpbb_user_group AS ug, `dgihavkajak_dk`.phpbb_groups as g WHERE u.user_id=ug.user_id AND u.user_id='15' AND g.group_id = ug.group_id AND group_single_user = 0 (0.001s)
[6] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as priv_upl_need_approval FROM cpg1410_usergroups WHERE group_id in (2,119) (0s)
[7] => SELECT group_name FROM cpg1410_usergroups WHERE group_id= 2 (0s)
[8] => SELECT user_favpics FROM cpg1410_favpics WHERE user_id = 15 (0s)
[9] => DELETE FROM cpg1410_banned WHERE expiry < '2007-02-21 14:40:56' (0s)
[10] => SELECT * FROM cpg1410_banned WHERE (ip_addr='130.225.22.254' OR ip_addr='130.225.22.254' OR user_id=15) AND brute_force=0 (0s)
[11] => SELECT aid FROM cpg1410_albums (0s)
[12] => SELECT cid, name, description, thumb FROM cpg1410_categories WHERE parent = '' ORDER BY pos (0s)
[13] => SELECT aid FROM cpg1410_albums WHERE category = 3 (0s)
[14] => SELECT count(*) FROM cpg1410_pictures as p, cpg1410_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 3 (0s)
[15] => SELECT cid, name, description, thumb FROM cpg1410_categories WHERE parent = '3' ORDER BY pos (0s)
[16] => SELECT aid FROM cpg1410_albums WHERE category = 2 (0s)
[17] => SELECT count(*) FROM cpg1410_pictures as p, cpg1410_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 2 (0s)
[18] => SELECT cid, name, description, thumb FROM cpg1410_categories WHERE parent = '2' ORDER BY pos (0s)
[19] => SELECT aid FROM cpg1410_albums as a WHERE category>=10000 (0s)
[20] => SELECT count(*) FROM cpg1410_pictures as p, cpg1410_albums as a WHERE p.aid = a.aid AND approved='YES' AND category >= 10000 (0s)
[21] => SELECT cid, name, description, thumb FROM cpg1410_categories WHERE parent = '1' ORDER BY pos (0s)
[22] => SELECT aid FROM cpg1410_albums as a WHERE category = '0' (0s)
[23] => SELECT count(*) FROM cpg1410_albums as a WHERE 1 (0s)
[24] => SELECT count(*) FROM cpg1410_pictures as p LEFT JOIN cpg1410_albums as a ON a.aid=p.aid WHERE 1 AND approved='YES' (0.001s)
[25] => SELECT count(*) FROM cpg1410_comments as c LEFT JOIN cpg1410_pictures as p ON c.pid=p.pid LEFT JOIN cpg1410_albums as a ON a.aid=p.aid WHERE 1 (0s)
[26] => SELECT count(*) FROM cpg1410_categories WHERE 1 (0s)
[27] => SELECT sum(hits) FROM cpg1410_pictures as p LEFT JOIN cpg1410_albums as a ON p.aid=a.aid WHERE 1 (0s)
[28] => SELECT count(*) FROM cpg1410_albums as a WHERE category = '0' (0s)
[29] => SELECT COUNT(*) from cpg1410_pictures WHERE approved = 'YES' AND aid IN (5) (0s)
[30] => SELECT * FROM cpg1410_pictures WHERE approved = 'YES' AND aid IN (5) ORDER BY RAND() LIMIT 8 (0.001s)
[31] => SELECT COUNT(*) from cpg1410_pictures WHERE approved = 'YES' AND aid IN (5) (0s)
[32] => SELECT * FROM cpg1410_pictures WHERE approved = 'YES' AND aid IN (5) ORDER BY pid DESC LIMIT 0 ,8 (0s)
)
==========================
GET :
------------------
Array
(
[sid] => 962c379c1af46d02fbbaa302917f0432
)
==========================
POST :
------------------
Array
(
)
==========================
Page generated in 0.275 seconds - 33 queries in 0.005 seconds - Album set : ; Meta set: AND aid IN (5) ;
regards
Jacob Ask
-
Then undo the code mod and put the user in group 19. Also are you using the 'post based groups' feature?
-
Try 119 instead of 19
-
The user temp is now i member of the group with ID 19, and the mod has been removed.
regards
Jacob Ask
-
Try making group 19 the primary group for the user.
-
I do not know how to change the groups order from the phpbb-admin-interface, but I have changed the group order in the SQL-table. Again this doen't realy seem o have any effect.
Now I am also experiencing problems with changing the bridging settings. I think I am going to have to try to remove the installation completely and reinstall coppermine.
Regards
Jacob
-
It seems (as you mentioned) to be related to the way PHPbb puts users in groups. When you register the user automiticalli gets his/her own group (i guess for rights-management) and putting the user in i speciel group just add's an additional gruop.
I ended up solving the problem using a bir from this (http://forum.coppermine-gallery.net/index.php?topic=32903.0) topic. I added:
// MOD - add manual admin access
$mod_usergroups = explode(',',substr(USER_GROUP_SET,1,-1));
$mod_allowedgroups = array('[b]group number[/b]');
$mod_validuser = (array_intersect($mod_allowedgroups,$mod_usergroups) ? true : false);
define('USER_IS_ADMIN_MANUAL', $mod_validuser);
define('GALLERY_ADMIN_MODE', (USER_IS_ADMIN || USER_IS_ADMIN_MANUAL) && $USER['am']);
// MOD - end
to init.inc.php and it works. The next thing would be to modify the rights of the group using the hints from the mentioned thread.
Thanks for the help!
Jacob