Location: Symbol Reference > Functions > JwEnablePrivilege Function
JWSCL Documentation
ContentsIndexHome
PreviousUpNext
JwEnablePrivilege Function
Pascal
function JwEnablePrivilege(const Index: TJwString; const Query: TJwPrivilegeSetType): boolean;
Parameters 
Description 
const Index: TJwString 
gets the privilege name  
const Query: TJwPrivilegeSetType 
defines whether the privilege should be enabled or disabled. Define pst_EnableIfAvail if you dont want to raise an exception if the privlege does not exist.  

Returns the previous state of the privilege, true if it was enabled, otherwise false. If the state is not available and query is pst_Disable the return value is false.

JwEnablePrivilege en- or disables a given privilege.

Exceptions 
Description 
will be raised if the privilege is not available and query is pst_Enable, otherwise the return value is false. If query is pst_EnableIfAvail the return is false, if the privilege could not be enabled. In this case no exception is raised. 
Copyright (c) 2010. All rights reserved.
This help was created by Doc-O-Matic sponsored by toolsfactory software inc.
What do you think about this topic? Send feedback!