Bas schrieb:
> Hello folks,
>
> I've got a (probably) beginner question, not sure this is the right
> place to post those questions so correct me if I'm in the wrong place.
>
> Making my first site with Turbogears and can find most things on the
> TG site or with some help from my friend Google.
> One thing I cant find is how to manage authentication/users outside
> catwalk. Made a controller method that can add users, but can't figure
> out how to assign the new users to a group with that controller
> method.
@expose(template.name)
#...@validate(...) left as an exercise
def add_group_to_user(self, user=None, group=None):
user = User.by_name(user)
group = Group.by_name(group)
user.groups.append(group)
return {}
This is just mocking the thing, but there isn't much more to it.
Diez
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---