of_setsecurity


pfcapsrv.pbl   >   pfc_n_cst_security   >   of_setsecurity   

Full name pfc_n_cst_security.of_setsecurity
Access public
Extend of boolean
Return value boolean
Prototype public function boolean of_setsecurity(window)

Name Datatype
No Data

Name Datatype
li_rc integer
ls_winname string

public function boolean of_setsecurity (window aw_obj);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  of_SetSecurity
//
//	Access:  public
//
//	Arguments : 
//	aw_obj 	window to have security set for
//
//	Returns:  Boolean; (True if security was set otherwise false)
//
//	Description:  Sets the security for the passed window. For this function to work properly
// 		the of_init function MUST have been called first.
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	5.0   Initial version
//	6.0	Cleanup code
//
//////////////////////////////////////////////////////////////////////////////
//
//	Copyright © 1996-1997 Sybase, Inc. and its subsidiaries.  All rights reserved.
//	Any distribution of the PowerBuilder Foundation Classes (PFC)
//	source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////

string	ls_winname
integer	li_rc

// check arguments
If IsNull(aw_obj) or Not IsValid(aw_obj) Then Return False

// check if security was set
If Not ib_initsecurity Then Return False

ls_winname = lower( aw_obj.classname() )
If of_LoadSecurity(ls_winname) < 1 Then Return False

il_numberofrows = ids_items.RowCount()

li_rc = of_SetControlArray(ls_winname, aw_obj.control, '')

// check for menu items
If len(aw_obj.menuname) > 0 Then
	if of_setmenu(ls_winname, aw_obj.menuid) = 0 then 
		// no security on the menu when associated with the window
		of_LoadSecurity(aw_obj.menuname)
		of_setmenu(aw_obj.menuname, aw_obj.menuid)  // so let's check the menu by it's self
	end if
End If

Return True


end function

     
Name Owner
No Data

     
Name Owner
powerobject.classname powerobject
datastore.rowcount datastore
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.len systemfunctions
systemfunctions.lower systemfunctions
pfc_n_cst_security.of_setmenu pfc_n_cst_security
pfc_n_cst_security.of_loadsecurity pfc_n_cst_security
pfc_n_cst_security.of_setcontrolarray pfc_n_cst_security

     
Full name
No Data

     
Name Scope
No Data