1 ##parameters=groupId, role, ajax='', REQUEST=None
3 aclu
= context
.aq_inner
.acl_users
4 prefix
= aclu
.getGroupPrefix()
5 group
= context
.portal_groups
.getGroupById(groupId
)
6 roles
= list(group
.getUserRoles()[:])
10 prefixLen
= len(prefix
)
11 groups
= [ g
[prefixLen
:] for g
in group
.getGroups(no_recurse
= 1) ]
15 aclu
.changeUser(groupId
, groups
= groups
, roles
= roles
)
17 if REQUEST
is not None :
18 from ZTUtils
import make_query
as mq
19 url
= context
.portal_url()
20 red
= REQUEST
.RESPONSE
.redirect
21 return red('%s/group_data?%s' % (url
, mq(group
=groupId
, ajax
=ajax
)))