| Previous · Next | |
| User | Message |
|
arjan
|
Date: 8/11/2011 10:41 am · Subject: Add user to group · Rating: 0
Hi all,I wrote a macro and in this macro a user may join a group. This group is based on an sql query on an external database. Cache timeout of that group is zero. I use this group as a privilege setting on a page; actually a redirect to a content handler. In the macro I kill the cache on this group, delete the stow for the groupObj, isInGroup and gotGroupsInGroup, but still: a) I do not see the redirect in the menu until after several seconds. b) I am not allowed to access the contentHandler, where access is granted based on: $session->user->isInGroup, until after several seconds. At the same time: if I display $session->user->isInGroup( xx ) Dumper $group->getDatabaseUsers The user is seen as part of that group. How do I solve this? Kind regards, Arjan. -- Recent: http://www.lomcongres.nl/ Congres- en nieuwsbriefportaal met relatiebeheer systeem voor het Landelijk Overleg Milieuhandhaving Setting Standards, a a Delft University of Technology and United Knowledge simulation exercise on strategy and cooperation in standardization, http://www.setting-standards.com United Knowledge, internet voor de publieke sector Keizersgracht 74 1015 CT Amsterdam T +31 (0)20 52 18 300 F +31 (0)20 52 18 301 bureau@unitedknowledge.nl http://www.unitedknowledge.nl M +31 (0)6 2427 1444 E arjan@unitedknowledge.nl Bezoek onze site op: http://www.unitedknowledge.nl Of bekijk een van onze projecten: http://www.handhavingsportaal.nl/ http://www.setting-standards.com/ http://www.lomcongres.nl/ http://www.clubvanmaarssen.org/ |
| Back to Top |
Rate [ | ]
|
|
perlDreamer
|
Date: 8/11/2011 11:25 am · Subject: Re: Add user to group · Rating: 0
Knowing the exact version of WebGUI always helps with debugging. Posting sample code does, too. |
| Back to Top |
Rate [ | ]
|
|
arjan
|
Date: 8/11/2011 2:21 pm · Subject: Re: Add user to group · Rating: 0
Thanks Colin, you put me on the right track. I understood your
answer as: yes that is indeed the way it should work and if it
doesn't it must be a mistake in your code. And that was the case. But to answer your questions, what I did was: my $group = WebGUI::Group->new( $session, "somegroupId" ); $group->clearCaches; And that indeed works. I don't dare to say what I did before.. ;) Kind regards, Arjan. On 08/11/2011 06:25 PM, colink@perldreamer.com wrote: perlDreamer wrote: -- Recent: http://www.lomcongres.nl/ Congres- en nieuwsbriefportaal met relatiebeheer systeem voor het Landelijk Overleg Milieuhandhaving Setting Standards, a a Delft University of Technology and United Knowledge simulation exercise on strategy and cooperation in standardization, http://www.setting-standards.com United Knowledge, internet voor de publieke sector Keizersgracht 74 1015 CT Amsterdam T +31 (0)20 52 18 300 F +31 (0)20 52 18 301 bureau@unitedknowledge.nl http://www.unitedknowledge.nl M +31 (0)6 2427 1444 E arjan@unitedknowledge.nl Bezoek onze site op: http://www.unitedknowledge.nl Of bekijk een van onze projecten: http://www.handhavingsportaal.nl/ http://www.setting-standards.com/ http://www.lomcongres.nl/ http://www.clubvanmaarssen.org/ |
| Back to Top |
Rate [ | ]
|
|
perlDreamer
|
Date: 8/11/2011 7:15 pm · Subject: Re: Add user to group · Rating: 0
Thanks Colin, you put me on the right track. I understood your answer as: yes that is indeed the way it should work and if it doesn't it must be a mistake in your code. Actually, I was figuring that it was an obscure corner case in the new group caching code and was hoping for a little more info to flesh out what it was. In any case, I'm glad that it's fixed now. |
| Back to Top |
Rate [ | ]
|