8e2e78df106fd2a3cd621aa9fb00dde26606044e
1 ##parameters=role, redirect, append_members=[], ajax=''
2 from ZTUtils
import make_query
as mq
3 red
= context
.REQUEST
.RESPONSE
.redirect
4 url
= context
.absolute_url()
8 context
.portal_membership
.setLocalRoles(context
, append_members
, role
)
10 msg
= "You are not allowed to manage this role in this context."
11 sd
= context
.session_data_manager
.getSessionData(create
= 1)
12 sd
.update({'roleToManage' : None})
13 return red('%s/%s?%s' % (url
, redirect
, mq(portal_status_message
= msg
, ajax
=ajax
)))
15 return red('%s/%s?%s' % (url
, redirect
, mq(roleToManage
=role
, ajax
=ajax
)))