db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject svn commit: r448424 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/sql/dictionary/ impl/sql/catalog/ impl/sql/conn/ impl/sql/execute/
Date Thu, 21 Sep 2006 01:24:26 GMT
Author: mikem
Date: Wed Sep 20 18:24:25 2006
New Revision: 448424

URL: http://svn.apache.org/viewvc?view=rev&rev=448424
Log:
DERBY-1787
contributed by Mamta Satoor
patch: DERBY1787_UseCorrectTerminologyV1diff.txt

Grant revoke functionality was added in Derby 10.2 The comments that went into the grant revoke
code, in some places refer to database owner as "dba". They are not the same thing. In the
grant revoke world, dba is a role. We haven't added roles into Derby yet but current use of
dba in comments might make it confusing when we do start working on roles including dba.


Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementSchemaPermission.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericAuthorizer.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DDLConstantAction.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/PrivilegeInfo.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TablePrivilegeInfo.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java?view=diff&rev=448424&r1=448423&r2=448424
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java
Wed Sep 20 18:24:25 2006
@@ -259,11 +259,11 @@
 	public DataDescriptorGenerator	getDataDescriptorGenerator();
 
 	/**
-	 * Get authorizationID of DBA
+	 * Get authorizationID of Database Owner
 	 *
 	 * @return	authorizationID
 	 */
-	public String getAuthorizationDBA();
+	public String getAuthorizationDatabaseOwner();
 
 	/**
 	 * Get authorization model in force, SqlStandard or legacy mode

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementSchemaPermission.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementSchemaPermission.java?view=diff&rev=448424&r1=448423&r2=448424
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementSchemaPermission.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementSchemaPermission.java
Wed Sep 20 18:24:25 2006
@@ -68,9 +68,10 @@
 		}
 		else
 		{
-			// Non-DBA Users can only create schemas that match their authid
-			// Also allow only DBA to set authid to another user
-			// Note that for DBA, check interface wouldn't be called at all
+			// Non-Database Owner Users can only create schemas that match 
+			// their authid. Also allow only Database Owner to set authid to 
+			// another user. Note that for Database Owner, check interface 
+			// wouldn't be called at all
 			if (!schemaName.equals(authid) || (aid != null && !aid.equals(authid)))
 				throw StandardException.newException(
 					SQLState.AUTH_NOT_DATABASE_OWNER, authid, schemaName);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java?view=diff&rev=448424&r1=448423&r2=448424
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java Wed
Sep 20 18:24:25 2006
@@ -303,7 +303,7 @@
 	  *
 	  * @param	tc	transaction controller
 	  * @param	fromMajorVersionNumber	version of the on-disk database
-	  * @param	aid						AuthorizationID of current user to be made DBA
+	  * @param	aid	 AuthorizationID of current user to be made Database Owner
 	  *
 	  *	@exception StandardException  Standard Cloudscape error policy.
 	  */
@@ -364,7 +364,7 @@
                 bootingDictionary.getSystemUtilSchemaDescriptor().getUUID());
 
 			if (SanityManager.DEBUG)
-				SanityManager.ASSERT((aid != null), "Failed to get new DBA authorization");
+				SanityManager.ASSERT((aid != null), "Failed to get new Database Owner authorization");
 
 			// Add new system catalogs created for grant and revoke
 			bootingDictionary.upgradeMakeCatalog(tc, DataDictionary.SYSTABLEPERMS_CATALOG_NUM);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java?view=diff&rev=448424&r1=448423&r2=448424
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
Wed Sep 20 18:24:25 2006
@@ -327,7 +327,7 @@
 	/** Dictionary version of the currently running engine */
 	private DD_Version  softwareVersion;
 
-	private String authorizationDBA;
+	private String authorizationDatabaseOwner;
 	private boolean usesSqlAuthorization;
 
 	/*
@@ -656,7 +656,7 @@
 	
 			if (create) {
 				String userName = IdUtil.getUserNameFromURLProps(startParams);
-				authorizationDBA = IdUtil.getUserAuthorizationId(userName);
+				authorizationDatabaseOwner = IdUtil.getUserAuthorizationId(userName);
 			
 				// create any required tables.
 				createDictionaryTables(startParams, bootingTC, ddg);
@@ -693,7 +693,7 @@
 				loadDictionaryTables(bootingTC, ddg, startParams);
 				SchemaDescriptor sd = locateSchemaRow(SchemaDescriptor.IBM_SYSTEM_SCHEMA_NAME,
 								 bootingTC);
-				authorizationDBA = sd.getAuthorizationId();
+				authorizationDatabaseOwner = sd.getAuthorizationId();
 				String sqlAuth = PropertyUtil.getDatabaseProperty(bootingTC,
 										Property.SQL_AUTHORIZATION_PROPERTY);
 				if (Boolean.valueOf(sqlAuth).booleanValue())
@@ -705,7 +705,7 @@
 			}
 					
 			if (SanityManager.DEBUG)
-				SanityManager.ASSERT((authorizationDBA != null), "Failed to get DBA authorization");
+				SanityManager.ASSERT((authorizationDatabaseOwner != null), "Failed to get Database Owner
authorization");
 
 			/* Commit & destroy the create database */
 			bootingTC.commit();
@@ -1177,13 +1177,13 @@
 	}
 
 	/**
-	 * Get authorizationID of DBA
+	 * Get authorizationID of Database Owner
 	 *
 	 * @return	authorizationID
 	 */
-	public String getAuthorizationDBA()
+	public String getAuthorizationDatabaseOwner()
 	{
-		return authorizationDBA;
+		return authorizationDatabaseOwner;
 	}
 
 	/**
@@ -5570,7 +5570,7 @@
 	 * while upgrading pre-10.2 databases to 10.2 or later versions. From 10.2,
 	 * all system schemas would be owned by database owner's authorizationId.
 	 *
-	 * @param aid							AuthorizationID of DBA
+	 * @param aid							AuthorizationID of Database Owner
 	 * @param tc							TransactionController to use
 	 *
 	 * @exception StandardException		Thrown on failure
@@ -6434,7 +6434,7 @@
             new SchemaDescriptor(
                 this, 
                 convertIdToLower ? schema_name.toLowerCase() : schema_name, 
-                authorizationDBA,
+                authorizationDatabaseOwner,
                 uuidFactory.recreateUUID(schema_uuid),
                 true);
 
@@ -8325,7 +8325,7 @@
         return new SchemaDescriptor(
                 this,
                 name,
-                authorizationDBA,
+                authorizationDatabaseOwner,
                 uuidFactory.recreateUUID(uuid),
                 true);
     }
@@ -8334,7 +8334,7 @@
     {
         return new SchemaDescriptor(this,
                                         name,
-                						authorizationDBA,
+                                        authorizationDatabaseOwner,
                                         (UUID) null,
                                         false);
     }
@@ -9688,7 +9688,7 @@
 	UUID routineUUID,
 	TransactionController tc) throws StandardException
 	{
-		createRoutinePermPublicDescriptor(routineUUID, tc, authorizationDBA);
+		createRoutinePermPublicDescriptor(routineUUID, tc, authorizationDatabaseOwner);
 	}
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericAuthorizer.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericAuthorizer.java?view=diff&rev=448424&r1=448423&r2=448424
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericAuthorizer.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericAuthorizer.java
Wed Sep 20 18:24:25 2006
@@ -148,9 +148,10 @@
             List requiredPermissionsList = activation.getPreparedStatement().getRequiredPermissionsList();
             DataDictionary dd = lcc.getDataDictionary();
 
-            // DBA can access any object. Ignore requiredPermissionsList for DBA
+            // Database Owner can access any object. Ignore 
+            // requiredPermissionsList for Database Owner
             if( requiredPermissionsList != null && ! requiredPermissionsList.isEmpty()
&& 
-				!authorizationId.equals(dd.getAuthorizationDBA()))
+				!authorizationId.equals(dd.getAuthorizationDatabaseOwner()))
             {
                 for( Iterator iter = requiredPermissionsList.iterator();
                      iter.hasNext();)

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DDLConstantAction.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DDLConstantAction.java?view=diff&rev=448424&r1=448423&r2=448424
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DDLConstantAction.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DDLConstantAction.java
Wed Sep 20 18:24:25 2006
@@ -247,10 +247,10 @@
 		DataDictionary dd = lcc.getDataDictionary();
 		DependencyManager dm = dd.getDependencyManager();
 		
-		//If a dba is creating this constraint, then no need to collect any 
-		//privilege dependencies because a dba can access any objects without 
-		//any restrictions
-		if (!(lcc.getAuthorizationId().equals(dd.getAuthorizationDBA())))
+		//If the Database Owner is creating this constraint, then no need to 
+		//collect any privilege dependencies because the Database Owner can   
+		//access any objects without any restrictions
+		if (!(lcc.getAuthorizationId().equals(dd.getAuthorizationDatabaseOwner())))
 		{
 			PermissionsDescriptor permDesc;
 			//Now, it is time to add into dependency system, constraint's 
@@ -378,10 +378,10 @@
 		DataDictionary dd = lcc.getDataDictionary();
 		DependencyManager dm = dd.getDependencyManager();
 		
-		//If a dba is creating this view/triiger, then no need to collect any 
-		//privilege dependencies because a dba can access any objects without 
-		//any restrictions
-		if (!(lcc.getAuthorizationId().equals(dd.getAuthorizationDBA())))
+		//If the Database Owner is creating this view/triiger, then no need to  
+		//collect any privilege dependencies because the Database Owner can  
+		//access any objects without any restrictions
+		if (!(lcc.getAuthorizationId().equals(dd.getAuthorizationDatabaseOwner())))
 		{
 			PermissionsDescriptor permDesc;
 			List requiredPermissionsList = activation.getPreparedStatement().getRequiredPermissionsList();

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/PrivilegeInfo.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/PrivilegeInfo.java?view=diff&rev=448424&r1=448423&r2=448424
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/PrivilegeInfo.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/PrivilegeInfo.java Wed
Sep 20 18:24:25 2006
@@ -52,7 +52,7 @@
 
 	/**
 	 * Determines whether a user is the owner of an object
-	 * (table, function, or procedure). Note that DBA can access
+	 * (table, function, or procedure). Note that Database Owner can access
 	 * database objects without needing to be their owner
 	 *
 	 * @param user					authorizationId of current user
@@ -69,7 +69,7 @@
 		throws StandardException
 	{
 		if (!user.equals(sd.getAuthorizationId()) &&
-				!user.equals(dd.getAuthorizationDBA()))
+				!user.equals(dd.getAuthorizationDatabaseOwner()))
 			throw StandardException.newException(SQLState.AUTH_NOT_OWNER,
 									  user,
 									  objectDescriptor.getDescriptorType(),

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TablePrivilegeInfo.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TablePrivilegeInfo.java?view=diff&rev=448424&r1=448423&r2=448424
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TablePrivilegeInfo.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TablePrivilegeInfo.java
Wed Sep 20 18:24:25 2006
@@ -135,7 +135,7 @@
 								   LanguageConnectionContext lcc)
 		throws StandardException
 	{
-		if (user.equals(dd.getAuthorizationDBA())) return;
+		if (user.equals(dd.getAuthorizationDatabaseOwner())) return;
 		
 		//  check view specific
 		if (td.getTableType() == TableDescriptor.VIEW_TYPE) 



Mime
View raw message