HasUserPrivilege

Description

Tests a user privilege level and, for the specified privilege, returns Boolean True if the current user has the privilege and otherwise returns False. Use this method to determine whether the user has the privilege to perform the specific task.

Data access, reporting, and management can be controlled at the database, record type (EntityDef), and field (column) levels. This method tests privileges related to record types and fields. To manage security at the record type and field levels, both your Rational ClearQuest client and the session database must support security privileges.

You can test the user privileges by specifying one of the UserPrivilegeMaskType constants.

Syntaxe

VBScript

session.HasUserPrivilege(priv_mask) 

Perl

session->HasUserPrivilege(priv_mask); 
Identificateur
Description
session
Objet Session représentant la session en cours d'accès à la base de données.
priv_mask
A UserPrivilegeMaskType enumerated constant (which is a Long) specifying the privilege to test.
Return value
A Boolean True if the current user has the specified privilege; otherwise, the return value is Boolean False.

Exemples

VBScript

has_privilege = session.HasUserPrivilege AD_SUPER_USER 

Perl

$has_privilege = $session->HasUserPrivilege ($CQPerlExt::CQ_SUPER_USER); 

Commentaires