Home > Contents > Index >
ccuser:setsiteroles
Sets roles for the user.
Syntax
<ccuser:setsiteroles name="user name" site="site id" object="user object name" />Parameters
name (required)
- Name of the user.
site (required)
- Site id.
object (required)
- Name of the user object.
Example
<!-- Add roles for this site --> <CCuser.GETsiteroleS name="u" site="968251170475" objvarname="srl"/> <STRINGlist name="useracls" STR="Approver,Publisher,WorkflowAdmin,SiteAdmin,Marketer,GeneralAdmin" DELIM=","/> <LOOP list="useracls"> <rolelist.HASrole name="srl" role="useracls.ITEM" varname="hasit"/> <IF COND="Variables.hasit=false"> <THEN> <rolelist.ADD name="srl" role="useracls.ITEM"/> <BR/> Added Role - <CSVAR name="useracls.ITEM"/> </THEN> </IF> </LOOP><BR/> <ccuser:setsiteroles name="u" site="968251170475" object="srl"/> <CCuser.GETsiteroleS name="u" site="968251170475" objvarname="roleobject"/> <rolelist.GETALL name="roleobject" varname="roles"/> <IF COND="IsVariable.roles=true"> <THEN> <BR/> After setting new roles - CCuser.GETsiteroleS: <CSVAR name="Variables.roles"/><BR/> </THEN> <ELSE> <BR/> After setting new roles - CCuser.GETsiteroleS: Variable not set!! <BR/><BR/> </ELSE> </IF><BR/>
Home > Contents > Index > ![]()
Oracle JSP Tag Reference
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.