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. :(
thanks for reporting the issue here, CW. I just posted in the sticky "bugs" thread as well, and then i saw your post.
Still can't access the tracker.
I found a secret hidden hotfix version of the project tracker that may potentially fix this problem. Can someone check to see?
Nope. Still can't access the tracker.
Spoiler
(http://i.imgur.com/0KoFMZo.png)
Maybe this is the same problem I had with accessing the tracker?
Btw, what are those new groups?
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.
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 (http://www.adventuregamestudio.co.uk/SMF-Project-Tools-0.5.zip) if someone wants to have a look. I would, but there are dozens of files, and I'm terribly busy and important doncha know.
Quote from: AGA on Thu 23/10/2014 11:14:41
The source code for the bug tracker is available here (http://www.adventuregamestudio.co.uk/SMF-Project-Tools-0.5.zip) if someone wants to have a look.
Time to study PHP! :)
UPD:Well, I guess it all starts in Subs-Project.php:
function projectAllowedTo($permission)
{
<...>
if (isset($user_info['project_permissions'][$permission]) && $user_info['project_permissions'][$permission])
return true;
return false;
}
Won't take you long, it's practically pseudocode.
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.
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.
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?
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 (http://adventuregamestudio.fr-bb.com/t2132-analyse-du-code-ags), throught javascript IIRC. It linked to the french AGS wiki manual (http://admin.no.uchi.free.fr/dokuwiki-2008-05-05/doku.php).
Sorry for beeing out of topic, but I'll love to have this functionality here.
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!
A quick search brought up this: http://www.adventuregamestudio.co.uk/forums/index.php?topic=47966.msg636451116#msg636451116 (http://www.adventuregamestudio.co.uk/forums/index.php?topic=47966.msg636451116#msg636451116)
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...
Well, if I got this right, here how it is queried from database (install.xml):
$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 :)
So this should be fixed now?
I can access the issue tracker now! :=
CW, for reference what I had to do was explicitly add every single usergroup in the forums with the default 'view, add, edit own' type permissions. Apparently the all usergroups group the tracker uses doesn't work for some reason...
Also seems to work for me now. Huzzah!