Members of new groups can't access issue tracker

Started by Crimson Wizard, Sun 12/10/2014 16:34:17

Previous topic - Next topic

Crimson Wizard

Whenever a forum member is assigned a newly created forum group, he cannot access issue tracker even though I explicitly enable access to that group in admin settings.
This begins to be frustrating, because many new groups were added recently. :(

Monsieur OUXX

thanks for reporting the issue here, CW. I just posted in the sticky "bugs" thread as well, and then i saw your post.
 


AGA

I found a secret hidden hotfix version of the project tracker that may potentially fix this problem.  Can someone check to see?


cat

Maybe this is the same problem I had with accessing the tracker?

Btw, what are those new groups?

Crimson Wizard

#6
Quote from: cat on Tue 21/10/2014 21:39:38
Maybe this is the same problem I had with accessing the tracker?

Btw, what are those new groups?

At least these three:
Point & Click Association (PCA)
Adventure Game Studio Addicts (AGSA)
Developers Anonymous (Devs-Anon) -- strangely Gurok who is a member of one did not complain yet.

There are also more, but I am unsure whether they existed before or not.



AGA

Well I'm stumped.  I have no idea what I did to fix it for cat anymore, since her profile seems to be set up exactly the same as the other guys' (aside from their membership of the new groups).  The source code for the bug tracker is available here if someone wants to have a look.  I would, but there are dozens of files, and I'm terribly busy and important doncha know.

Crimson Wizard

#8
Quote from: AGA on Thu 23/10/2014 11:14:41
The source code for the bug tracker is available here if someone wants to have a look.
Time to study PHP! :)


UPD:
Well, I guess it all starts in Subs-Project.php:
Code: php

function projectAllowedTo($permission)
{
<...>
	if (isset($user_info['project_permissions'][$permission]) && $user_info['project_permissions'][$permission])
		return true;

	return false;
}


AGA

Won't take you long, it's practically pseudocode.

Crimson Wizard

#10
BTW, did you know that when you put [ code = php ] on forums, the forums link PHP functions to the online manual on www.php.net?
Try to hover mouse over "isset" word in my post above.
Quite useful.

Gurok

#11
Quote from: Crimson Wizard on Thu 23/10/2014 11:28:12
BTW, did you know that when you put [ code = php ] on forums, the forums link PHP functions to the online manual on www.php.net?
Try to hover mouse over "isset" word in my post above.
Quite useful.

We should do that for AGS functions! :D

BTW, I did know I couldn't access it, but I just assumed that meant there was no work for me.
[img]http://7d4iqnx.gif;rWRLUuw.gi

Adeel

Gurok works with PHP at his day job, I'm sure he can view it at his leisure and won't dissapoint. Would you, Gurok?

Billbis

Quote from: Gurok on Thu 23/10/2014 11:47:00We should do that for AGS functions! :D
Kitai have done that for the french forum, throught javascript IIRC. It linked to the french AGS wiki manual.
Sorry for beeing out of topic, but I'll love to have this functionality here.

AGA

CW, see if you can work out where it draws those permissions from.  I've had a poke around in the database, and the project_permissions table seems to contain some very confusing permissions.  I must be reading it wrong, because it appears that no members except the tracker admins have access to view issues!  Unless "issue_view" doesn't actually mean that.

If you get totally stuck, I could probably let you have a look at the admin panel and database, but obviously that's a last resort!


AGA

I thought that too, but that membergroup doesn't exist anymore!  You have the same groups as any other user, except for the Mittens one...

Crimson Wizard

#17
Well, if I got this right, here how it is queried from database (install.xml):

Code: php

$user_info['project_permissions'] = array();
		
$request = $smcFunc['db_query']('', '
	SELECT permission
	FROM {db_prefix}project_permissions
	WHERE id_group IN({array_int:groups})
		AND id_profile = {int:profile}',
	array(
		'profile' => $context['project']['profile'],
		'groups' => $user_info['groups'],
	)
);
	
while ($row = $smcFunc['db_fetch_assoc']($request))
	$user_info['project_permissions'][$row['permission']] = true;	


So, it gets a table of permissions, and for each existing row sets "true" to the permission with respected id.
Permission is acquired if its group id is met within the array of group ids belonging to user info.

Frankly I don't see anything illogical so far.

Taken that there IS mistake somewhere, it is either DB not having proper data, or user_info lost some group ids?

Quote from: AGA on Thu 23/10/2014 13:04:47
If you get totally stuck, I could probably let you have a look at the admin panel and database...
I would like to look at the permissions table, in read-only mode, if that's acceptable :)

AGA


Gurok

[img]http://7d4iqnx.gif;rWRLUuw.gi

SMF spam blocked by CleanTalk