Back to User management: Provision
DESCRIPTION
This is a simplified version of the script-based PVG-policy with a possible values list.
Note This code may use functions from the ARS Script Policy Best Practices. Please, follow the link to obtain instructions and code for those functions.
SCRIPT
'*********************************************************************************
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
' EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
' WARRANTIES OF MERCHANTBILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
'
' IF YOU WANT THIS FUNCTIONALITY TO BE CONDITIONALLY SUPPORTED,
' PLEASE CONTACT QUEST PROFESSIONAL SERVICES.
'*********************************************************************************
'
' This code is published on the ActiveRoles Script Center:
' http://communities.quest.com/docs/DOC-9991
'
' This code may use functions from the ARS Script Policy Best Practices:
' http://communities.quest.com/docs/DOC-10016
'
' Please, follow the link to obtain instructions and code for those functions.
'*********************************************************************************
Option Explicit
Const strAttrName = "edsvaEstablishmentName"
Dim arrPossibleValues
arrPossibleValues = Array( _
"Kexbrough Primary School", _
"Cudworth Churchfield Primary School", _
"Athersley North Primary School", _
"Athersley South Primary School", _
"Bank End Primary School", _
"Barugh Green Primary School", _
"Birdwell Primary School" )
'-----------------------------------------------------------------------------------
'-- onGetEffectivePolicy
'-----------------------------------------------------------------------------------
Sub onGetEffectivePolicy(Request)
If (LCase(Request.Class) <> "user") Then Exit Sub
Call Request.SetEffectivePolicyInfo(strAttrName, EDS_EPI_UI_VALUE_REQURIED, True)
Call Request.SetEffectivePolicyInfo(strAttrName, EDS_EPI_UI_RESTRICTED, True)
Call Request.SetEffectivePolicyInfo(strAttrName, EDS_EPI_UI_POSSIBLE_VALUES, arrPossibleValues) ' <--- possible values
Call Request.SetEffectivePolicyInfo(strAttrName, EDS_EPI_UI_GENERATED_VALUE, arrPossibleValues(0)) ' <--- the first one is a default value
End Sub ' onGetEffectivePolicy
'***** END OF CODE ***************************************************************
COMPATIBILITY
Script compatible with the following version(s): <Not specified>