Documentation of 'org.hsqldb.rights.Grantee' Java class
Grantee
org.hsqldb.rights

Class Grantee

  • All Implemented Interfaces:
    SchemaObject
    Direct Known Subclasses:
    User


    public class Grantee
    extends java.lang.Object
    implements SchemaObject
    A Grantee Object holds the name, access and administrative rights for a particular grantee.

    It supplies the methods used to grant, revoke, test and check a grantee's access rights to other database objects. It also holds a reference to the common PUBLIC User Object, which represent the special user refered to in GRANT ... TO PUBLIC statements.

    The check(), isAccessible() and getGrantedClassNames() methods check the rights granted to the PUBLIC User Object, in addition to individually granted rights, in order to decide which rights exist for the user. Method names ending in Direct indicate methods which do not recurse to look through Roles which "this" object is a member of. We use the word "Admin" (e.g., in private variable "admin" and method "isAdmin()) to mean this Grantee has admin priv by any means. We use the word "adminDirect" (e.g., in private variable "adminDirect" and method "isAdminDirect()) to mean this Grantee has admin priv directly.

    Since:
    1.8.0
    • Method Detail

      • getSQL

        public java.lang.String getSQL()
        Specified by:
        getSQL in interface SchemaObject
      • isRole

        public boolean isRole()
      • isSystem

        public boolean isSystem()
      • getDirectRoles

        public OrderedHashSet getDirectRoles()
        Gets direct roles, not roles nested within them.
      • getAllRoles

        public OrderedHashSet getAllRoles()
        Gets direct and indirect roles.
      • getGranteeAndAllRoles

        public OrderedHashSet getGranteeAndAllRoles()
      • getGranteeAndAllRolesWithPublic

        public OrderedHashSet getGranteeAndAllRolesWithPublic()
      • isAccessible

        public boolean isAccessible(SchemaObject object)
        returns true if grantee has any privilege (to any column) of the object
      • hasRole

        public boolean hasRole(Grantee role)
      • checkSelect

        public void checkSelect(SchemaObject object,
                                boolean[] checkList)
        Checks if a right represented by the methods have been granted on the specified database object.

        This is done by checking that a mapping exists in the rights map from the dbobject argument. Otherwise, it throws.

      • checkInsert

        public void checkInsert(SchemaObject object,
                                boolean[] checkList)
      • checkUpdate

        public void checkUpdate(SchemaObject object,
                                boolean[] checkList)
      • checkReferences

        public void checkReferences(SchemaObject object,
                                    boolean[] checkList)
      • checkTrigger

        public void checkTrigger(SchemaObject object,
                                 boolean[] checkList)
      • checkDelete

        public void checkDelete(SchemaObject object)
      • checkAccess

        public void checkAccess(SchemaObject object)
      • checkSchemaUpdateOrGrantRights

        public void checkSchemaUpdateOrGrantRights(java.lang.String schemaName)
        Checks if this object can modify schema objects or grant access rights to them.
      • hasSchemaUpdateOrGrantRights

        public boolean hasSchemaUpdateOrGrantRights(java.lang.String schemaName)
        Checks if this object can modify schema objects or grant access rights to them.
      • isGrantable

        public boolean isGrantable(Grantee role)
      • checkAdmin

        public void checkAdmin()
        Checks whether this Grantee has administrative privs either directly or indirectly. Otherwise it throws.
      • isAdmin

        public boolean isAdmin()
        Returns true if this Grantee has administrative privs either directly or indirectly.
      • isSchemaCreator

        public boolean isSchemaCreator()
        Returns true if this Grantee can create schemas with own authorization.
      • canChangeAuthorisation

        public boolean canChangeAuthorisation()
        Returns true if this Grantee can change to a different user.
      • isPublic

        public boolean isPublic()
        Returns true if this grantee object is for the PUBLIC role.
      • visibleGrantees

        public OrderedHashSet visibleGrantees()
        Iteration of all visible grantees, including self.

        For grantees with admin, this is all grantees. For regular grantees, this is self plus all roles granted directly or indirectly

      • hasNonSelectTableRight

        public boolean hasNonSelectTableRight(SchemaObject table)
      • hasColumnRights

        public boolean hasColumnRights(SchemaObject table,
                                       int[] columnMap)

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.