autorisation des tags form, input et textarea.
[Plinn.git] / skins / control / append_users_in_local_role.py
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()
5
6 if append_members :
7 try :
8 context.portal_membership.setLocalRoles(context, append_members, role)
9 except :
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)))
14
15 return red('%s/%s?%s' % (url, redirect, mq(roleToManage=role, ajax=ajax)))