c24c237a57dc776550efb9d2b7f87dafb58b6819
1 ##parameters=role, redirect, remove_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
, remove_members
, role
, remove
=1)
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
)))