ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rle...@apache.org
Subject ambari git commit: AMBARI-16449. RBAC: Change permission_label for role AMBARI.ADMINISTRATOR to "Ambari Administrator" (rlevas)
Date Fri, 13 May 2016 15:11:13 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 154a805da -> a636af8ae


AMBARI-16449. RBAC: Change permission_label for role AMBARI.ADMINISTRATOR to "Ambari Administrator"
(rlevas)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a636af8a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a636af8a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a636af8a

Branch: refs/heads/branch-2.4
Commit: a636af8aebefe2de06bfccf441280c684d8d5088
Parents: 154a805
Author: Robert Levas <rlevas@hortonworks.com>
Authored: Fri May 13 11:10:47 2016 -0400
Committer: Robert Levas <rlevas@hortonworks.com>
Committed: Fri May 13 11:11:03 2016 -0400

----------------------------------------------------------------------
 ambari-server/docs/api/v1/permission-get.md               |  2 +-
 .../apache/ambari/server/upgrade/UpgradeCatalog230.java   |  2 +-
 .../src/main/resources/Ambari-DDL-Derby-CREATE.sql        |  2 +-
 .../src/main/resources/Ambari-DDL-MySQL-CREATE.sql        |  2 +-
 .../src/main/resources/Ambari-DDL-Oracle-CREATE.sql       |  2 +-
 .../src/main/resources/Ambari-DDL-Postgres-CREATE.sql     |  2 +-
 .../resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql     |  2 +-
 .../src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql  |  2 +-
 .../src/main/resources/Ambari-DDL-SQLServer-CREATE.sql    |  2 +-
 .../internal/AmbariPrivilegeResourceProviderTest.java     | 10 +++++-----
 .../internal/GroupPrivilegeResourceProviderTest.java      |  2 +-
 .../internal/PermissionResourceProviderTest.java          |  4 ++--
 .../internal/UserPrivilegeResourceProviderTest.java       |  2 +-
 .../ambari/server/upgrade/UpgradeCatalog230Test.java      |  2 +-
 14 files changed, 19 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a636af8a/ambari-server/docs/api/v1/permission-get.md
----------------------------------------------------------------------
diff --git a/ambari-server/docs/api/v1/permission-get.md b/ambari-server/docs/api/v1/permission-get.md
index d949344..5c79be6 100644
--- a/ambari-server/docs/api/v1/permission-get.md
+++ b/ambari-server/docs/api/v1/permission-get.md
@@ -72,7 +72,7 @@ Get the permission with the permission_id of 1.
       "PermissionInfo" : {
         "permission_id" : 1,
         "permission_name" : "AMBARI.ADMINISTRATOR",
-        "permission_label" : "Administrator",
+        "permission_label" : "Ambari Administrator",
         "resource_name" : "AMBARI"
       }
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/a636af8a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog230.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog230.java
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog230.java
index 2389d0d..53a22c8 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog230.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog230.java
@@ -380,7 +380,7 @@ public class UpgradeCatalog230 extends AbstractUpgradeCatalog {
 
     LOG.info("Setting permission labels");
     dbAccessor.executeUpdate(String.format(updateStatement,
-        "Administrator", PermissionEntity.AMBARI_ADMINISTRATOR_PERMISSION));
+        "Ambari Administrator", PermissionEntity.AMBARI_ADMINISTRATOR_PERMISSION));
     dbAccessor.executeUpdate(String.format(updateStatement,
         "Cluster User", PermissionEntity.CLUSTER_USER_PERMISSION));
     dbAccessor.executeUpdate(String.format(updateStatement,

http://git-wip-us.apache.org/repos/asf/ambari/blob/a636af8a/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql
index d77a0b3..31dd8f2 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql
@@ -1180,7 +1180,7 @@ INSERT INTO Users (user_id, principal_id, user_name, user_password)
   SELECT 1, 1, 'admin', '538916f8943ec225d97a9a86a2c6ec0818c1cd400e09e03b660fdaaec4af29ddbb6f2b1033b81b00'
FROM SYSIBM.SYSDUMMY1;
 
 insert into adminpermission(permission_id, permission_name, resource_type_id, permission_label,
principal_id, sort_order)
-  SELECT 1, 'AMBARI.ADMINISTRATOR', 1, 'Administrator', 7, 1 FROM SYSIBM.SYSDUMMY1
+  SELECT 1, 'AMBARI.ADMINISTRATOR', 1, 'Ambari Administrator', 7, 1 FROM SYSIBM.SYSDUMMY1
   UNION ALL
   SELECT 2, 'CLUSTER.USER', 2, 'Cluster User', 8, 6 FROM SYSIBM.SYSDUMMY1
   UNION ALL

http://git-wip-us.apache.org/repos/asf/ambari/blob/a636af8a/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
index f6ee1e7..3c4f1ca 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
@@ -1115,7 +1115,7 @@ INSERT INTO users(user_id, principal_id, user_name, user_password)
   SELECT 1, 1, 'admin','538916f8943ec225d97a9a86a2c6ec0818c1cd400e09e03b660fdaaec4af29ddbb6f2b1033b81b00';
 
 INSERT INTO adminpermission(permission_id, permission_name, resource_type_id, permission_label,
principal_id, sort_order)
-  SELECT 1, 'AMBARI.ADMINISTRATOR', 1, 'Administrator', 7, 1 UNION ALL
+  SELECT 1, 'AMBARI.ADMINISTRATOR', 1, 'Ambari Administrator', 7, 1 UNION ALL
   SELECT 2, 'CLUSTER.USER', 2, 'Cluster User', 8, 6 UNION ALL
   SELECT 3, 'CLUSTER.ADMINISTRATOR', 2, 'Cluster Administrator', 9, 2 UNION ALL
   SELECT 4, 'VIEW.USER', 3, 'View User', 10, 7 UNION ALL

http://git-wip-us.apache.org/repos/asf/ambari/blob/a636af8a/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
index 6000d24..f31af16 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
@@ -1128,7 +1128,7 @@ insert into users(user_id, principal_id, user_name, user_password)
 select 1,1,'admin','538916f8943ec225d97a9a86a2c6ec0818c1cd400e09e03b660fdaaec4af29ddbb6f2b1033b81b00'
from dual;
 
 insert into adminpermission(permission_id, permission_name, resource_type_id, permission_label,
principal_id, sort_order)
-  select 1, 'AMBARI.ADMINISTRATOR', 1, 'Administrator', 7, 1 from dual
+  select 1, 'AMBARI.ADMINISTRATOR', 1, 'Ambari Administrator', 7, 1 from dual
   union all
   select 2, 'CLUSTER.USER', 2, 'Cluster User', 8, 6 from dual
   union all

http://git-wip-us.apache.org/repos/asf/ambari/blob/a636af8a/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
index 67bd38a..d1147b7 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
@@ -1106,7 +1106,7 @@ INSERT INTO Users (user_id, principal_id, user_name, user_password)
   SELECT 1, 1, 'admin', '538916f8943ec225d97a9a86a2c6ec0818c1cd400e09e03b660fdaaec4af29ddbb6f2b1033b81b00';
 
 INSERT INTO adminpermission(permission_id, permission_name, resource_type_id, permission_label,
principal_id, sort_order)
-  SELECT 1, 'AMBARI.ADMINISTRATOR', 1, 'Administrator', 7, 1 UNION ALL
+  SELECT 1, 'AMBARI.ADMINISTRATOR', 1, 'Ambari Administrator', 7, 1 UNION ALL
   SELECT 2, 'CLUSTER.USER', 2, 'Cluster User', 8, 6 UNION ALL
   SELECT 3, 'CLUSTER.ADMINISTRATOR', 2, 'Cluster Administrator', 9, 2 UNION ALL
   SELECT 4, 'VIEW.USER', 3, 'View User', 10, 7 UNION ALL

http://git-wip-us.apache.org/repos/asf/ambari/blob/a636af8a/ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql
index ea7ab7a..5a7a6a5 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql
@@ -1268,7 +1268,7 @@ INSERT INTO ambari.Users (user_id, principal_id, user_name, user_password)
   SELECT 1, 1, 'admin', '538916f8943ec225d97a9a86a2c6ec0818c1cd400e09e03b660fdaaec4af29ddbb6f2b1033b81b00';
 
 INSERT INTO ambari.adminpermission(permission_id, permission_name, resource_type_id, permission_label,
principal_id, sort_order)
-  SELECT 1, 'AMBARI.ADMINISTRATOR', 1, 'Administrator', 7, 1 UNION ALL
+  SELECT 1, 'AMBARI.ADMINISTRATOR', 1, 'Ambari Administrator', 7, 1 UNION ALL
   SELECT 2, 'CLUSTER.USER', 2, 'Cluster User', 8, 6 UNION ALL
   SELECT 3, 'CLUSTER.ADMINISTRATOR', 2, 'Cluster Administrator', 9, 2 UNION ALL
   SELECT 4, 'VIEW.USER', 3, 'View User', 10, 7 UNION ALL

http://git-wip-us.apache.org/repos/asf/ambari/blob/a636af8a/ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql
index 1c3393e..2dba3b7 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql
@@ -1125,7 +1125,7 @@ insert into users(user_id, principal_id, user_name, user_password)
   select 1, 1, 'admin','538916f8943ec225d97a9a86a2c6ec0818c1cd400e09e03b660fdaaec4af29ddbb6f2b1033b81b00';
 
 insert into adminpermission(permission_id, permission_name, resource_type_id, permission_label,
principal_id, sort_order)
-  select 1, 'AMBARI.ADMINISTRATOR', 1, 'Administrator', 7, 1
+  select 1, 'AMBARI.ADMINISTRATOR', 1, 'Ambari Administrator', 7, 1
   union all
   select 2, 'CLUSTER.USER', 2, 'Cluster User', 8, 6
   union all

http://git-wip-us.apache.org/repos/asf/ambari/blob/a636af8a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
index 2245f77..e769e5b 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
@@ -1134,7 +1134,7 @@ BEGIN TRANSACTION
 
   insert into adminpermission(permission_id, permission_name, resource_type_id, permission_label,
principal_id, sort_order)
   values
-    (1, 'AMBARI.ADMINISTRATOR', 1, 'Administrator', 7, 1),
+    (1, 'AMBARI.ADMINISTRATOR', 1, 'Ambari Administrator', 7, 1),
     (2, 'CLUSTER.USER', 2, 'Cluster User', 8, 6),
     (3, 'CLUSTER.ADMINISTRATOR', 2, 'Cluster Administrator', 9, 2),
     (4, 'VIEW.USER', 3, 'View User', 10, 7),

http://git-wip-us.apache.org/repos/asf/ambari/blob/a636af8a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
index 67a94ea..99962ee 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
@@ -187,7 +187,7 @@ public class AmbariPrivilegeResourceProviderTest extends EasyMockSupport
{
     expect(ambariUserEntity.getPrincipal()).andReturn(ambariPrincipalEntity).anyTimes();
     expect(ambariUserEntity.getUserName()).andReturn("joe").anyTimes();
     expect(ambariPermissionEntity.getPermissionName()).andReturn("AMBARI.ADMINISTRATOR").anyTimes();
-    expect(ambariPermissionEntity.getPermissionLabel()).andReturn("Administrator").anyTimes();
+    expect(ambariPermissionEntity.getPermissionLabel()).andReturn("Ambari Administrator").anyTimes();
     expect(ambariPrincipalEntity.getPrincipalType()).andReturn(ambariPrincipalTypeEntity).anyTimes();
     expect(ambariPrincipalTypeEntity.getName()).andReturn("USER").anyTimes();
 
@@ -294,7 +294,7 @@ public class AmbariPrivilegeResourceProviderTest extends EasyMockSupport
{
 
     Assert.assertEquals(6, resource1.getPropertiesMap().get("PrivilegeInfo").size());
     Assert.assertEquals("AMBARI.ADMINISTRATOR", resource1.getPropertyValue(AmbariPrivilegeResourceProvider.PERMISSION_NAME_PROPERTY_ID));
-    Assert.assertEquals("Administrator", resource1.getPropertyValue(AmbariPrivilegeResourceProvider.PERMISSION_LABEL_PROPERTY_ID));
+    Assert.assertEquals("Ambari Administrator", resource1.getPropertyValue(AmbariPrivilegeResourceProvider.PERMISSION_LABEL_PROPERTY_ID));
     Assert.assertEquals("joe", resource1.getPropertyValue(AmbariPrivilegeResourceProvider.PRINCIPAL_NAME_PROPERTY_ID));
     Assert.assertEquals("USER", resource1.getPropertyValue(AmbariPrivilegeResourceProvider.PRINCIPAL_TYPE_PROPERTY_ID));
     Assert.assertEquals(31, resource1.getPropertyValue(AmbariPrivilegeResourceProvider.PRIVILEGE_ID_PROPERTY_ID));
@@ -331,7 +331,7 @@ public class AmbariPrivilegeResourceProviderTest extends EasyMockSupport
{
   public void testToResource_AMBARI() {
     PermissionEntity permissionEntity = createMock(PermissionEntity.class);
     expect(permissionEntity.getPermissionName()).andReturn("ADMINISTRATOR").atLeastOnce();
-    expect(permissionEntity.getPermissionLabel()).andReturn("Administrator").atLeastOnce();
+    expect(permissionEntity.getPermissionLabel()).andReturn("Ambari Administrator").atLeastOnce();
 
     PrincipalTypeEntity principalTypeEntity = createMock(PrincipalTypeEntity.class);
     expect(principalTypeEntity.getName()).andReturn("USER").atLeastOnce();
@@ -597,7 +597,7 @@ public class AmbariPrivilegeResourceProviderTest extends EasyMockSupport
{
     privilegeEntities.add(createMockPrivilegeEntity(
         1, ambariResourceEntity,
         principalEntity,
-        createMockPermissionEntity("AMBARI.ADMINISTRATOR", "Administrator", ambariResourceTypeEntity)));
+        createMockPermissionEntity("AMBARI.ADMINISTRATOR", "Ambari Administrator", ambariResourceTypeEntity)));
 
     PrivilegeDAO privilegeDAO = injector.getInstance(PrivilegeDAO.class);
     expect(privilegeDAO.findAll()).andReturn(privilegeEntities).atLeastOnce();
@@ -623,7 +623,7 @@ public class AmbariPrivilegeResourceProviderTest extends EasyMockSupport
{
     Resource resource = resources.iterator().next();
 
     Assert.assertEquals("AMBARI.ADMINISTRATOR", resource.getPropertyValue(AmbariPrivilegeResourceProvider.PERMISSION_NAME_PROPERTY_ID));
-    Assert.assertEquals("Administrator", resource.getPropertyValue(AmbariPrivilegeResourceProvider.PERMISSION_LABEL_PROPERTY_ID));
+    Assert.assertEquals("Ambari Administrator", resource.getPropertyValue(AmbariPrivilegeResourceProvider.PERMISSION_LABEL_PROPERTY_ID));
     Assert.assertEquals("User1", resource.getPropertyValue(AmbariPrivilegeResourceProvider.PRINCIPAL_NAME_PROPERTY_ID));
     Assert.assertEquals("USER", resource.getPropertyValue(AmbariPrivilegeResourceProvider.PRINCIPAL_TYPE_PROPERTY_ID));
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/a636af8a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProviderTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProviderTest.java
index f03d240..c3510a8 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProviderTest.java
@@ -96,7 +96,7 @@ public class GroupPrivilegeResourceProviderTest extends EasyMockSupport
{
   public void testToResource_AMBARI() {
     PermissionEntity permissionEntity = createMock(PermissionEntity.class);
     expect(permissionEntity.getPermissionName()).andReturn("ADMINISTRATOR").atLeastOnce();
-    expect(permissionEntity.getPermissionLabel()).andReturn("Administrator").atLeastOnce();
+    expect(permissionEntity.getPermissionLabel()).andReturn("Ambari Administrator").atLeastOnce();
 
     PrincipalTypeEntity principalTypeEntity = createMock(PrincipalTypeEntity.class);
     expect(principalTypeEntity.getName()).andReturn("GROUP").atLeastOnce();

http://git-wip-us.apache.org/repos/asf/ambari/blob/a636af8a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/PermissionResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/PermissionResourceProviderTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/PermissionResourceProviderTest.java
index bcfae8d..26491ba 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/PermissionResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/PermissionResourceProviderTest.java
@@ -76,7 +76,7 @@ public class PermissionResourceProviderTest {
     expect(dao.findAll()).andReturn(permissionEntities);
     expect(permissionEntity.getId()).andReturn(99);
     expect(permissionEntity.getPermissionName()).andReturn("AMBARI.ADMINISTRATOR");
-    expect(permissionEntity.getPermissionLabel()).andReturn("Administrator");
+    expect(permissionEntity.getPermissionLabel()).andReturn("Ambari Administrator");
     expect(permissionEntity.getSortOrder()).andReturn(1);
     expect(permissionEntity.getResourceType()).andReturn(resourceTypeEntity);
     expect(resourceTypeEntity.getName()).andReturn("AMBARI");
@@ -90,7 +90,7 @@ public class PermissionResourceProviderTest {
 
     Assert.assertEquals(99, resource.getPropertyValue(PermissionResourceProvider.PERMISSION_ID_PROPERTY_ID));
     Assert.assertEquals("AMBARI.ADMINISTRATOR", resource.getPropertyValue(PermissionResourceProvider.PERMISSION_NAME_PROPERTY_ID));
-    Assert.assertEquals("Administrator", resource.getPropertyValue(PermissionResourceProvider.PERMISSION_LABEL_PROPERTY_ID));
+    Assert.assertEquals("Ambari Administrator", resource.getPropertyValue(PermissionResourceProvider.PERMISSION_LABEL_PROPERTY_ID));
     Assert.assertEquals("AMBARI", resource.getPropertyValue(PermissionResourceProvider.RESOURCE_NAME_PROPERTY_ID));
     Assert.assertEquals(1, resource.getPropertyValue(PermissionResourceProvider.SORT_ORDER_PROPERTY_ID));
     verify(dao, permissionEntity, resourceTypeEntity);

http://git-wip-us.apache.org/repos/asf/ambari/blob/a636af8a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProviderTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProviderTest.java
index 4e0ba24..88b00ca 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProviderTest.java
@@ -104,7 +104,7 @@ public class UserPrivilegeResourceProviderTest extends EasyMockSupport
{
   public void testToResource_AMBARI() {
     PermissionEntity permissionEntity = createMock(PermissionEntity.class);
     expect(permissionEntity.getPermissionName()).andReturn("ADMINISTRATOR").atLeastOnce();
-    expect(permissionEntity.getPermissionLabel()).andReturn("Administrator").atLeastOnce();
+    expect(permissionEntity.getPermissionLabel()).andReturn("Ambari Administrator").atLeastOnce();
 
     PrincipalTypeEntity principalTypeEntity = createMock(PrincipalTypeEntity.class);
     expect(principalTypeEntity.getName()).andReturn("USER").atLeastOnce();

http://git-wip-us.apache.org/repos/asf/ambari/blob/a636af8a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog230Test.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog230Test.java
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog230Test.java
index 6cf520d..d7e13ea 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog230Test.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog230Test.java
@@ -238,7 +238,7 @@ public class UpgradeCatalog230Test extends EasyMockSupport {
     // Set permission labels
     updateQueryPattern = "UPDATE adminpermission SET permission_label='%s' WHERE permission_id=%d";
     expect(dbAccessor.executeUpdate(String.format(updateQueryPattern,
-        "Administrator", PermissionEntity.AMBARI_ADMINISTRATOR_PERMISSION)))
+        "Ambari Administrator", PermissionEntity.AMBARI_ADMINISTRATOR_PERMISSION)))
         .andReturn(1).once();
     expect(dbAccessor.executeUpdate(String.format(updateQueryPattern,
         "Cluster User", PermissionEntity.CLUSTER_USER_PERMISSION)))


Mime
View raw message