Adventure Game Studio

AGS Development => Site & Forum Reports => Topic started by: Crimson Wizard on Sun 12/10/2014 16:34:17

Title: Members of new groups can't access issue tracker
Post by: Crimson Wizard on Sun 12/10/2014 16:34:17
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. :(
Title: Re: Members of new groups can't access issue tracker
Post by: Monsieur OUXX on Tue 14/10/2014 06:00:20
thanks for reporting the issue here, CW. I just posted in the sticky "bugs" thread as well, and then i saw your post.
Title: Re: Members of new groups can't access issue tracker
Post by: Adeel on Tue 21/10/2014 10:58:13
Still can't access the tracker.
Title: Re: Members of new groups can't access issue tracker
Post by: AGA on Tue 21/10/2014 12:35:29
I found a secret hidden hotfix version of the project tracker that may potentially fix this problem.  Can someone check to see?
Title: Re: Members of new groups can't access issue tracker
Post by: Adeel on Tue 21/10/2014 20:54:03
Nope. Still can't access the tracker.

Spoiler
(http://i.imgur.com/0KoFMZo.png)
[close]
Title: Re: Members of new groups can't access issue tracker
Post by: 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?
Title: Re: Members of new groups can't access issue tracker
Post by: Crimson Wizard on Tue 21/10/2014 22:02:43
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.


Title: Re: Members of new groups can't access issue tracker
Post by: AGA on Thu 23/10/2014 11:14:41
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.
Title: Re: Members of new groups can't access issue tracker
Post by: Crimson Wizard on Thu 23/10/2014 11:19:38
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:
Code (php) Select

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

return false;
}

Title: Re: Members of new groups can't access issue tracker
Post by: AGA on Thu 23/10/2014 11:22:18
Won't take you long, it's practically pseudocode.
Title: Re: Members of new groups can't access issue tracker
Post by: 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.
Title: Re: Members of new groups can't access issue tracker
Post by: Gurok on Thu 23/10/2014 11:47:00
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.
Title: Re: Members of new groups can't access issue tracker
Post by: Adeel on Thu 23/10/2014 12:08:00
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?
Title: Re: Members of new groups can't access issue tracker
Post by: Billbis on Thu 23/10/2014 12:15:26
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.
Title: Re: Members of new groups can't access issue tracker
Post by: AGA on Thu 23/10/2014 13:04:47
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!
Title: Re: Members of new groups can't access issue tracker
Post by: cat on Thu 23/10/2014 14:46:50
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)
Title: Re: Members of new groups can't access issue tracker
Post by: AGA on Thu 23/10/2014 14:53:42
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...
Title: Re: Members of new groups can't access issue tracker
Post by: Crimson Wizard on Thu 23/10/2014 18:54:12
Well, if I got this right, here how it is queried from database (install.xml):

Code (php) Select

$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 :)
Title: Re: Members of new groups can't access issue tracker
Post by: AGA on Wed 03/12/2014 09:04:29
So this should be fixed now?
Title: Re: Members of new groups can't access issue tracker
Post by: Gurok on Wed 03/12/2014 10:05:56
I can access the issue tracker now! :=
Title: Re: Members of new groups can't access issue tracker
Post by: AGA on Wed 03/12/2014 10:13:21
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...
Title: Re: Members of new groups can't access issue tracker
Post by: Monsieur OUXX on Sun 07/12/2014 14:26:29
Also seems to work for me now. Huzzah!