MySQL 9.1.0
Source Code Documentation
Restrictions_aggregator Class Referenceabstract

Base class to perform aggregation of two restriction lists. More...

#include <partial_revokes.h>

Inheritance diagram for Restrictions_aggregator:
[legend]

Public Member Functions

virtual ~Restrictions_aggregator ()
 Destructor. More...
 
virtual bool generate (Abstract_restrictions &restrictions)=0
 
virtual bool find_if_require_next_level_operation (Access_bitmask &rights) const =0
 

Protected Types

enum class  Status {
  Error , Warning , Validated , Aggregated ,
  No_op
}
 

Protected Member Functions

 Restrictions_aggregator (const Auth_id &grantor, const Auth_id grantee, const Access_bitmask grantor_global_access, const Access_bitmask grantee_global_access, const Access_bitmask requested_access)
 Constructor. More...
 
 Restrictions_aggregator (const Restrictions_aggregator &)=delete
 
Restrictions_aggregatoroperator= (const Restrictions_aggregator &)=delete
 
 Restrictions_aggregator (const Restrictions_aggregator &&)=delete
 
Restrictions_aggregatoroperator= (const Restrictions_aggregator &&)=delete
 

Protected Attributes

const Auth_id m_grantor
 Grantor information. More...
 
const Auth_id m_grantee
 Grantee information. More...
 
const Access_bitmask m_grantor_global_access
 Global static privileges of grantor. More...
 
const Access_bitmask m_grantee_global_access
 Global static privileges of grantee. More...
 
const Access_bitmask m_requested_access
 Privileges that are being granted or revoked. More...
 
Status m_status
 Internal status of aggregation process. More...
 

Detailed Description

Base class to perform aggregation of two restriction lists.

Aggregation is required if all of the following requirements are met:

  1. Partial revocation feature is enabled
  2. GRANT/REVOKE operation
  3. Either grantor or grantee or both have restrictions associated with them

Task of the aggregator is to evaluate updates required for grantee's restriction. Based on restrictions associated with grantor/grantee: A. Add additional restrictions E.g. - GRANT of a new privileges by a grantor who has restrictions for privileges being granted

  • Creation of restrictions through REVOKE B. Remove some restrictions E.g. - GRANT of existing privileges by a grantor without restrictions
  • REVOKE of existing privileges

Member Enumeration Documentation

◆ Status

enum class Restrictions_aggregator::Status
strongprotected
Enumerator
Error 
Warning 
Validated 
Aggregated 
No_op 

Constructor & Destructor Documentation

◆ ~Restrictions_aggregator()

Restrictions_aggregator::~Restrictions_aggregator ( )
virtualdefault

Destructor.

◆ Restrictions_aggregator() [1/3]

Restrictions_aggregator::Restrictions_aggregator ( const Auth_id grantor,
const Auth_id  grantee,
const Access_bitmask  grantor_global_access,
const Access_bitmask  grantee_global_access,
const Access_bitmask  requested_access 
)
protected

Constructor.

Parameters
[in]grantorGrantor account information
[in]granteeGrantee account information
[in]grantor_global_accessGlobal static privileges of grantor
[in]grantee_global_accessGlobal static privileges of grantee
[in]requested_accessPrivileges being granted/revoked through current statement

◆ Restrictions_aggregator() [2/3]

Restrictions_aggregator::Restrictions_aggregator ( const Restrictions_aggregator )
protecteddelete

◆ Restrictions_aggregator() [3/3]

Restrictions_aggregator::Restrictions_aggregator ( const Restrictions_aggregator &&  )
protecteddelete

Member Function Documentation

◆ find_if_require_next_level_operation()

virtual bool Restrictions_aggregator::find_if_require_next_level_operation ( Access_bitmask rights) const
pure virtual

Implemented in DB_restrictions_aggregator.

◆ generate()

virtual bool Restrictions_aggregator::generate ( Abstract_restrictions restrictions)
pure virtual

Implemented in DB_restrictions_aggregator.

◆ operator=() [1/2]

Restrictions_aggregator & Restrictions_aggregator::operator= ( const Restrictions_aggregator &&  )
protecteddelete

◆ operator=() [2/2]

Restrictions_aggregator & Restrictions_aggregator::operator= ( const Restrictions_aggregator )
protecteddelete

Member Data Documentation

◆ m_grantee

const Auth_id Restrictions_aggregator::m_grantee
protected

Grantee information.

◆ m_grantee_global_access

const Access_bitmask Restrictions_aggregator::m_grantee_global_access
protected

Global static privileges of grantee.

◆ m_grantor

const Auth_id Restrictions_aggregator::m_grantor
protected

Grantor information.

◆ m_grantor_global_access

const Access_bitmask Restrictions_aggregator::m_grantor_global_access
protected

Global static privileges of grantor.

◆ m_requested_access

const Access_bitmask Restrictions_aggregator::m_requested_access
protected

Privileges that are being granted or revoked.

◆ m_status

Status Restrictions_aggregator::m_status
protected

Internal status of aggregation process.


The documentation for this class was generated from the following files: