Oracle® OLAP DML Reference 11g Release 1 (11.1) Part Number B28126-01 |
|
|
View PDF |
The PERMITRESET command causes the values of permission conditions to be reevaluated. Permission conditions consist of one or more Boolean expressions that designate the criteria used by PERMIT commands associated with an object.
When permission conditions are dimensioned, they indicate which values of a dimensioned object PERMIT will target for permission. A single-cell permission condition can indicate any Boolean criterion, such as whether or not a particular user may access the object.
When you want to keep the existing PERMIT commands for an object, but you want the permission conditions associated with them to be recalculated, issue a PERMITRESET statement. The permission for that object will be based on the new values of the permission conditions the next time you use the object in an OLAP DML statement.
Syntax
PERMITRESET [object_name] [READ|WRITE]
Arguments
Specifies the name of an object for which permission conditions should be reevaluated. When you do not specify an object name, the permission conditions for all objects are reevaluated.
Causes reevaluation of the permission conditions for PERMIT
READ
commands only, or for a PERMIT
READ
statement for the specified object.
Causes reevaluation of the permission conditions for PERMIT
WRITE
commands only, or for a PERMIT
WRITE
statement for the specified object.
Examples
Example 10-79 Resetting Permission
In the following example, the user-defined Boolean function usercheck
checks the current value of the variable thisuser
and returns YES
only when it is greater than 100
. Access to the variable uservar
is only allowed when thisuser
is greater than 100
. However, when you change the value of thisuser
to a value less than or equal to 100
without resetting the permission for uservar
, access is still permitted.
The statement
DESCRIBE uservar
produces the following output.
DEFINE USERVAR VARIABLE INTEGER PERMIT READ WHEN usercheck(thisuser)
The statement
SHOW uservar
produces the following output.
5
The statement
DESCRIBE usercheck
produces the following output.
DEFINE USERCHECK PROGRAM BOOLEAN PROGRAM ARG thisuser INT TRAP ON errorexit NOPRINT IF thisuser GT 100 THEN RETURN YES ELSE RETURN NO errorexit: RETURN NO END
The statement
DESCRIBE thisuser
produces the following output.
DEFINE THISUSER VARIABLE INTEGER
The statement
SHOW thisuser
produces the following output.
101
The statements
thisuser = 100 SHOW uservar
produces the following output.
5
The statements
PERMITRESET luservar READ SHOW uservar
produce the following error.
ERROR: You do not have permission to read this value of USERVAR