WRDAuthSupportBase::GetUserEditPolicy (open)
Get the current user editing policy
Syntax
LOADLIB "mod::wrd/lib/auth.whlib";
RECORD FUNCTION GetUserEditPolicy(INTEGER userid, RECORD fields, BOOLEAN atsubmit)
Parameters
INTEGER userid
Current user id. 0 for new users
RECORD fields
Current values. Is DEFAULT RECORD at user screen initialization and when getting searchable fields.
STRING email
Currently filled in email
INTEGER unit
Currently selected unit
STRING username
Current filled in username
BOOLEAN atsubmit
Whether the data is being submitted (might have more stringent rules)
Return value
RECORD
Policy record
BOOLEAN haspassword
Whether the user can set a password in WebHare (eg not synced to AD or LDAP)
STRING passwordvalidationchecks
Password validation checks
RECORD screenextension
Optional screen extension to load for the user screen
STRING screenextension.file
File with the screen tabextension
STRING screenextension.name
Name of the tabextension node
RECORD searchablefields
For every authorisation object (unit, role and person) the list of searchable fields
STRING ARRAY searchablefields.person
List of searchable fields for a person
STRING ARRAY searchablefields.role
List of searchable fields for a role
STRING ARRAY searchablefields.unit
List of searchable fields for a unit
Description
Get the current policry for editing users This function is called:
- when the user data has just been loaded (atsubmit is FALSE)
- when the user presses submit (atsubmit is TRUE)
- when the submit request has been handled (atsubmit is FALSE) The state of input fields is then updated according to the returned policy.