plainblack.com
Username Password
search
Bookmark and Share

    

Add user to group

User arjan
Date 8/11/2011 10:41 am
Views 377
Rating 0    Rate [
|
]
Previous · Next
User Message
arjan
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

Knowing the exact version of WebGUI always helps with debugging.

Posting sample code does, too.



Back to Top
Rate [
|
]
 
 
arjan
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:

Knowing the exact version of WebGUI always helps with debugging.

Posting sample code does, too.



http://www.webgui.org/forums/dev/add-user-to-group/1

--

WebGUI
http://www.webgui.org


-- 
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

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.

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 [
|
]
 
 
    



© 2012 Plain Black Corporation | All Rights Reserved