Package org.apache.derby.iapi.sql.dictionary

Examples of org.apache.derby.iapi.sql.dictionary.StatementColumnPermission


              //the given authorizer. If this privilege
              //doesn't cover all the column , then there
              //has to exisit REFERENCES for the remaining
              //columns at PUBLIC level. Get that permission
              //descriptor and save it in dependency system
              StatementColumnPermission statementColumnPermission = (StatementColumnPermission) statPerm;
              permDesc = statementColumnPermission.getPUBLIClevelColPermsDescriptor(lcc.getAuthorizationId(), dd);
              //Following if checks if some column level privileges
              //exist only at public level. If so, then the public
              //level column privilege dependency is added
              //into the dependency system
              if (permDesc != null)
View Full Code Here


              //user2
              //create view v1 as select c11 from user1.t11 where c12=2;
              //For the view above, there are 2 column level privilege
              //depencies, one for column c11 which exists directly
              //for user2 and one for column c12 which exists at PUBLIC level.
              StatementColumnPermission statementColumnPermission = (StatementColumnPermission) statPerm;
              permDesc = statementColumnPermission.getPUBLIClevelColPermsDescriptor(lcc.getAuthorizationId(), dd);
              //Following if checks if some column level privileges
              //exist only at public level. If so, then the public
              //level column privilege dependency of view is added
              //into dependency system.
              if (permDesc != null)
View Full Code Here

              //the given authorizer. If this privilege
              //doesn't cover all the column , then there
              //has to exisit REFERENCES for the remaining
              //columns at PUBLIC level. Get that permission
              //descriptor and save it in dependency system
              StatementColumnPermission statementColumnPermission = (StatementColumnPermission) statPerm;
              permDesc = statementColumnPermission.getPUBLIClevelColPermsDescriptor(lcc.getAuthorizationId(), dd);
              //Following if checks if some column level privileges
              //exist only at public level. If so, then the public
              //level column privilege dependency is added
              //into the dependency system
              if (permDesc != null)
View Full Code Here

              //user2
              //create view v1 as select c11 from user1.t11 where c12=2;
              //For the view above, there are 2 column level privilege
              //depencies, one for column c11 which exists directly
              //for user2 and one for column c12 which exists at PUBLIC level.
              StatementColumnPermission statementColumnPermission = (StatementColumnPermission) statPerm;
              permDesc = statementColumnPermission.getPUBLIClevelColPermsDescriptor(lcc.getAuthorizationId(), dd);
              //Following if checks if some column level privileges
              //exist only at public level. If so, then the public
              //level column privilege dependency of view is added
              //into dependency system.
              if (permDesc != null)
View Full Code Here

    TableDescriptor td = column.getTableDescriptor();
    if (td == null)
      return;
    UUID tableUUID = td.getUUID();
    StatementTablePermission key = new StatementTablePermission( tableUUID, currPrivType);
    StatementColumnPermission tableColumnPrivileges
      = (StatementColumnPermission) requiredColumnPrivileges.get( key);
    if( tableColumnPrivileges == null)
    {
      tableColumnPrivileges = new StatementColumnPermission( tableUUID,
                                   currPrivType,
                                   new FormatableBitSet( td.getNumberOfColumns()));
      requiredColumnPrivileges.put(key, tableColumnPrivileges);
    }
    tableColumnPrivileges.getColumns().set(column.getPosition() - 1);
  } // end of addRequiredColumnPriv
View Full Code Here

              // given authorizer. If this privilege doesn't
              // cover all the column , then there has to exisit
              // REFERENCES for the remaining columns at PUBLIC
              // level or at role level.  Get that permission
              // descriptor and save it in dependency system
              StatementColumnPermission
                statementColumnPermission = (
                  StatementColumnPermission)statPerm;
              permDesc = statementColumnPermission.
                getPUBLIClevelColPermsDescriptor
                   (lcc.getAuthorizationId(), dd);
              //Following if checks if some column level privileges
              //exist only at public level. If so, then the public
              //level column privilege dependency is added
              //into the dependency system
              if (permDesc != null &&
                  permDesc.getObjectID() != null) {
                // User did not have all required column
                // permissions and at least one column is
                // covered by PUBLIC.
                dm.addDependency(dependent, permDesc,
                         lcc.getContextManager());
              }
              // Possibly, the current role has also been relied
              // upon.
              if (!statementColumnPermission.
                  allColumnsCoveredByUserOrPUBLIC
                      (lcc.getAuthorizationId(), dd)) {
                // Role has been relied upon, so register a
                // dependency.
                trackRoleDependency
View Full Code Here

              //user2
              //create view v1 as select c11 from user1.t11 where c12=2;
              //For the view above, there are 2 column level privilege
              //depencies, one for column c11 which exists directly
              //for user2 and one for column c12 which exists at PUBLIC level.
              StatementColumnPermission statementColumnPermission = (StatementColumnPermission) statPerm;
              permDesc = statementColumnPermission.getPUBLIClevelColPermsDescriptor(lcc.getAuthorizationId(), dd);
              //Following if checks if some column level privileges
              //exist only at public level. If so, then the public
              //level column privilege, if any, dependency of
              //view is added into dependency system.

              if (permDesc != null &&
                  permDesc.getObjectID() != null) {
                // User did not have all required column
                // permissions and at least one column is
                // covered by PUBLIC.
                dm.addDependency(dependent, permDesc,
                         lcc.getContextManager());
              } // else nothing found for PUBLIC..

              // Has the the current role has also been relied
              // upon?
              if (!statementColumnPermission.
                  allColumnsCoveredByUserOrPUBLIC
                      (lcc.getAuthorizationId(), dd)) {
                trackRoleDependency
                  (activation, dependent, roleDepAdded);
              }
View Full Code Here

      //MIN_SELECT_PRIV requirement for the table because that
      //requirement is already getting satisfied with the already
      //existing SELECT privilege requirement
      StatementTablePermission key = new StatementTablePermission(
          tableUUID, Authorizer.SELECT_PRIV);
      StatementColumnPermission tableColumnPrivileges
        = (StatementColumnPermission) requiredColumnPrivileges.get( key);
      if( tableColumnPrivileges != null)
        return;
    }
    if( currPrivType == Authorizer.SELECT_PRIV){
      //If we are here for SELECT_PRIV requirement, then first check
      //if there is already any MIN_SELECT_PRIV privilege required
      //on this table. If yes, then that requirement will be fulfilled
      //by the SELECT_PRIV requirement we are adding now. Because of
      //that, remove the MIN_SELECT_PRIV privilege requirement
      StatementTablePermission key = new StatementTablePermission(
          tableUUID, Authorizer.MIN_SELECT_PRIV);
      StatementColumnPermission tableColumnPrivileges
        = (StatementColumnPermission) requiredColumnPrivileges.get( key);
      if( tableColumnPrivileges != null)
        requiredColumnPrivileges.remove(key);
    }
   
    StatementTablePermission key = new StatementTablePermission( tableUUID, currPrivType);
    StatementColumnPermission tableColumnPrivileges
      = (StatementColumnPermission) requiredColumnPrivileges.get( key);
    if( tableColumnPrivileges == null)
    {
      tableColumnPrivileges = new StatementColumnPermission( tableUUID,
                                   currPrivType,
                                   new FormatableBitSet( td.getNumberOfColumns()));
      requiredColumnPrivileges.put(key, tableColumnPrivileges);
    }
    tableColumnPrivileges.getColumns().set(column.getPosition() - 1);
  } // end of addRequiredColumnPriv
View Full Code Here

      //on this table. If yes, then that requirement will be fulfilled
      //by the SELECT_PRIV requirement we are adding now. Because of
      //that, remove the MIN_SELECT_PRIV privilege requirement
      StatementTablePermission key = new StatementTablePermission(
          table.getUUID(), Authorizer.MIN_SELECT_PRIV);
      StatementColumnPermission tableColumnPrivileges
        = (StatementColumnPermission) requiredColumnPrivileges.get( key);
      if( tableColumnPrivileges != null)
        requiredColumnPrivileges.remove(key);
    }
View Full Code Here

              // given authorizer. If this privilege doesn't
              // cover all the column , then there has to exisit
              // REFERENCES for the remaining columns at PUBLIC
              // level or at role level.  Get that permission
              // descriptor and save it in dependency system
              StatementColumnPermission
                statementColumnPermission = (
                  StatementColumnPermission)statPerm;
              permDesc = statementColumnPermission.
                getPUBLIClevelColPermsDescriptor
                   (lcc.getAuthorizationId(), dd);
              //Following if checks if some column level privileges
              //exist only at public level. If so, then the public
              //level column privilege dependency is added
              //into the dependency system
              if (permDesc != null &&
                  permDesc.getObjectID() != null) {
                // User did not have all required column
                // permissions and at least one column is
                // covered by PUBLIC.
                dm.addDependency(dependent, permDesc,
                         lcc.getContextManager());
              }
              // Possibly, the current role has also been relied
              // upon.
              if (!statementColumnPermission.
                  allColumnsCoveredByUserOrPUBLIC
                      (lcc.getAuthorizationId(), dd)) {
                // Role has been relied upon, so register a
                // dependency.
                trackRoleDependency
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.sql.dictionary.StatementColumnPermission

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.