Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

IsCallerInRole – PB Docs 126 – PowerBuilder Library

IsCallerInRole – PB Docs 126

IsCallerInRole PowerScript function

Description

Indicates whether the direct caller of a COM object running
on COM+ is in a specified role (either individually or
as part of a group).

Controls

TransactionServer objects

Syntax

Argument

Description

transactionserver

Reference to the TransactionServer service
instance

role

A string expression containing the name
of a role

Return Values

Boolean. Returns true if
the direct caller is in the specified role and false if
it is not.

Usage

In COM+, a role is a name that represents the set
of access permissions for a specific user or group of users. For
example, a component that provides access to a sales database might
have different roles for managers and salespersons.

In your code, you use IsCallerInRole to
determine whether the caller of the current method is associated
with a specific role before you execute code that performs a task
restricted to users in that role.

IsCallerInRole only determines whether
the direct caller of the current method is in the specified role.
The direct caller may be either a client process or a server process.

note.png Package must run in a dedicated server process

To support role-checking, the COM+ package must be
activated as a Server package, not a Library package. Server packages
run in a dedicated server process. Library packages run in the creator’s
process and are used primarily for debugging.

IsCallerInRole only returns a meaningful
value when security checking is enabled. Security checking can be
enabled in the COM/COM+ Project wizard or the
Project painter

Examples

The following example shows a call to a function
(f_checkrole) that takes the name of
a role as an argument and returns an integer. In this example only managers
can place orders with a value over $20,000:

The f_checkrole function checks
whether a component is running on COM+ and if security
checking is enabled. Then it checks whether the direct caller is in
the role passed in as an argument. If any of the checks fail, the
function returns a negative value:

See Also


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x