Oracle® OLAP DML Reference 10g Release 1 (10.1) Part Number B10339-02 |
|
|
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 command. 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 the PERMIT
READ
command for the specified object.
Causes reevaluation of the permission conditions for PERMIT
WRITE
commands only, or for the PERMIT
WRITE
command for the specified object.
Notes
Provided you have permit permission for an object, you can change its permission by issuing new PERMIT commands for it. The new permission will be evaluated upon next reference to the object. See "Permission and the OBJ Function".
When you are targeting any object but a dimension for permission, and the permission condition consists of a single Boolean variable, any changes to that variable affect the permission immediately. You do not need to execute a PERMITRESET in this case.
In general, permission are evaluated upon next reference to the object. However, the OBJ function is an exception to this rule. The OBJ function provides information about an analytic workspace object that you specify. Because OBJ does not load the object into memory, it does not reflect any changes to the object's permission since the last time it was loaded. When you want OBJ to provide information based on new permission criteria, execute a LOAD command before the OBJ.
Examples
Example 19-35 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