Class Reference
IRIS for UNIX 2019.2
InterSystems: The power behind what matters   
Documentation  Search
  [%SYS] >  [Security] >  [SQLRoleGrantOption]
Private  Storage   

persistent class Security.SQLRoleGrantOption extends %Persistent, %XML.Adaptor, %SYSTEM.Help

Define the SQL RoleGrantOption mapping in the ^SYS global for whether a role is granted to the user/role with admin/grant option Mapping was added for SQL RoleGrantOption to take advantage of XML export


Parameters Properties Methods Queries Indices ForeignKeys Triggers
3 2 2 1


Grantable RoleGranted UserOrRole

%AddToSaveSet %AddToSyncSet %CheckConstraints %CheckConstraintsForExtent
%ClassIsLatestVersion %ClassName %ComposeOid %ConstructClone
%Delete %DeleteExtent %DeleteId %DispatchClassMethod
%DispatchGetModified %DispatchGetProperty %DispatchMethod %DispatchSetModified
%DispatchSetMultidimProperty %DispatchSetProperty %Exists %ExistsId
%Extends %GUID %GUIDSet %GetLock
%GetParameter %GetSwizzleObject %Id %IsA
%IsModified %IsNull %KillExtent %LockExtent
%LockId %New %NormalizeObject %ObjectIsNull
%ObjectModified %Oid %OnBeforeAddToSync %OnDetermineClass
%Open %OpenId %OriginalNamespace %PackageName
%PurgeIndices %Reload %RemoveFromSaveSet %ResolveConcurrencyConflict
%RollBack %Save %SaveDirect %SerializeObject
%SetModified %SortBegin %SortEnd %SyncObjectIn
%SyncTransport %UnlockExtent %UnlockId %ValidateIndices
%ValidateObject Export Help Import
XMLDTD XMLExport XMLExportToStream XMLExportToString
XMLNew XMLSchema XMLSchemaNamespace XMLSchemaType


• property Grantable as %TinyInt(VALUELIST=",0,1") [ Required ];
Grantable - 1/0, can this role be granted by the user
• property RoleGranted as %String(MAXLEN=64,MINLEN=1) [ Required ];
RoleGranted - Role that was granted to the user/role
• property UserOrRole as %String(MAXLEN=64,MINLEN=1) [ Required ];
UserOrRole - User or Role the role was granted to


• classmethod Export(FileName As %String = "SQLRoleGrantOptionExport.xml", ByRef NumExported As %Integer = 0) as %Status
This method exports SQLRoleGrantOption records to a file in xml format.
Filename - Output file name
NumExported (byref) - Returns number of records exported.
• classmethod Import(FileName As %String, ByRef NumImported As %Integer, Flags As %Integer = 0) as %Status
Import SQLRoleGrantOption records from an xml file.
FileName - Filename to import Role records from
NumImported (byref) - Returns number of records imported
Flags - Control import
Bit 0 - Do not import records, just return count
Note: On failure, no records will be imported


• query DirectRoles(UserOrRole As %String)
SQL Query :
SELECT UserOrRole,RoleGranted,Grantable FROM Security.SQLRoleGrantOption
WHERE (UserOrRole = :UserOrRole)
Given a User or Role name, return the roles and grant options for the roles granted directly to this UserOrRole
• query List()
SQL Query :
SELECT UserOrRole,RoleGranted,Grantable FROM Security.SQLRoleGrantOption
Return the ID information for all SQL Role Grant Options


•index (IDKey on UserOrRole,RoleGranted) [IdKey];

Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.