IsSecurityEnabled
PowerScript function
Description
Indicates whether or not security checking is enabled for a COM
object running on COM+.
Applies to
TransactionServer objects
Syntax
|
1 |
transactionserver.IsSecurityEnabled ( ) |
|
Argument |
Description |
|---|---|
|
transactionserver |
Reference to the TransactionServer service instance |
Return value
Boolean.
Returns true if security checking is enabled and false if it is
not.
Usage
Use IsSecurityEnabled to determine whether security checking is
enabled for the current COM object.
If the COM object is running in the creator’s process,
IsSecurityEnabled always returns false.
Examples
The following example determines whether security checking is
enabled and, if it is, checks whether the direct caller is in the Manager
role before completing the call:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
TransactionServer ts integer li_rc string str_role = "Admin" li_rc = GetContextService( "TransactionServer", & ts ) // Find out if security is enabled. IF ts.IsSecurityEnabled() THEN // Find out if the caller is in the role. IF NOT ts.IsCallerInRole(str_role) THEN // do not complete call ELSE // execute call normally END IF ELSE // security is not enabled // do not complete call END IF |
See also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest