ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Beerbower" <tbeerbo...@hortonworks.com>
Subject Re: Review Request 23694: Views : Admin - Add Privilege Resource
Date Sat, 19 Jul 2014 21:11:35 GMT


> On July 19, 2014, 1:37 a.m., Nate Cole wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/GroupDAO.java, lines
76-78
> > <https://reviews.apache.org/r/23694/diff/1/?file=635830#file635830line76>
> >
> >     Will throw a NoResultException on empty resultset - just letting you know since
we just saw this with AlertDefinition stuff.

Thanks, I made the change to 'daoUtils.selectList(query)' in PrincipalDAO as well.


- Tom


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23694/#review48169
-----------------------------------------------------------


On July 18, 2014, 10:25 p.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23694/
> -----------------------------------------------------------
> 
> (Updated July 18, 2014, 10:25 p.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley and Nate Cole.
> 
> 
> Bugs: AMBARI-6543
>     https://issues.apache.org/jira/browse/AMBARI-6543
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Sorry for the size of the patch.  I tried to break portions out into separate Jiras.
 This does not include Cluster privileges and does not include the upgrade to create admin
resource and principal entries for existing users/groups and clusters/view instances.
> 
> -----
> 
> 
> Add service/resource, resource provider and db tables/entities for Privilege resources
as described in the Admin doc ...
> 
> https://docs.google.com/a/hortonworks.com/document/d/1heCrAA6hNM8qvQ091f8KGICABw2pY6Pt25uyfAvV8SQ/edit?disco=AAAAAJqU6lg#
> 
> 
> API support
> 
> {code}
> 
> POST
> /api/v1/views/WEATHER/versions/1.0.0/instances/US_WEST/privileges
> Request
> [
>   {
>     "Privileges" : {
>       "permission_name" : "VIEW.USE",
>       "principal_name" : "Jeff",
>       "principal_type" : "user"
>     }
>   }
> ]
> {code}
> 
> {code}
> 
> POST
> /api/v1/views/WEATHER/versions/1.0.0/instances/US_WEST/privileges
> Request
> [
>   {
>     "Privileges" : {
>       "permission_name" : "VIEW.USE",
>       "principal_name" : "Engineering",
>       "principal_type" : "group"
>     }
>   }
> ]
> {code}
> 
> {code}
> 
> DELETE
> /api/v1/views/WEATHER/versions/1.0.0/instances/US_WEST/privileges?Privileges/principal_type=user&Privileges/principal_name=Jeff
> {code}
> 
> {code}
> 
> DELETE
> /api/v1/views/WEATHER/versions/1.0.0/instances/US_WEST/privileges?Privileges/principal_type=group&Privileges/principal_name=Engineering
> {code}
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/PrivilegeResourceDefinition.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
4532919 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/ViewInstanceResourceDefinition.java
00b4264 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariPrivilegeService.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/PrivilegeService.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewInstanceService.java
c32abe6 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewPrivilegeService.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java 2011367

>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProvider.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/DefaultProviderModule.java
fa1aa67 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/PermissionResourceProvider.java
faf692f 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/PrivilegeResourceProvider.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProvider.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java a61ab37

>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/GroupDAO.java b54b935

>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/PermissionDAO.java PRE-CREATION

>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/PrincipalDAO.java PRE-CREATION

>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/PrincipalTypeDAO.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/PrivilegeDAO.java PRE-CREATION

>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ResourceDAO.java PRE-CREATION

>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ResourceTypeDAO.java PRE-CREATION

>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/UserDAO.java 96c7d77 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewInstanceDAO.java 4e4e149

>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/GroupEntity.java
64fcf9a 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PermissionEntity.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalEntity.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalTypeEntity.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrivilegeEntity.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ResourceEntity.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ResourceTypeEntity.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UserEntity.java 1d38a4a

>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java a26e5e7

>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java
2c48d9f 
>   ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthoritiesPopulator.java
fe6d571 
>   ambari-server/src/main/java/org/apache/ambari/server/security/authorization/Users.java
a94adaf 
>   ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
d75ef85 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 849da64

>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql c1bc0cc 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 7bfdb29 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 09cb052 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql f837e0a 
>   ambari-server/src/main/resources/META-INF/persistence.xml 7e5629a 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/PrivilegeResourceDefinitionTest.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/ViewInstanceResourceDefinitionTest.java
e1feaad 
>   ambari-server/src/test/java/org/apache/ambari/server/api/services/PrivilegeServiceTest.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/PermissionResourceProviderTest.java
3c95207 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProviderTest.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/OrmTestHelper.java fe579ba

>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/PrincipalDAOTest.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/PrincipalTypeDAOTest.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ResourceDAOTest.java PRE-CREATION

>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ResourceTypeDAOTest.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/entities/PrincipalEntityTest.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/entities/PrincipalTypeEntityTest.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ResourceEntityTest.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ResourceTypeEntityTest.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ViewEntityTest.java
44027ab 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ViewInstanceEntityTest.java
b7de666 
>   ambari-server/src/test/java/org/apache/ambari/server/security/authorization/TestAmbariLdapAuthoritiesPopulator.java
a287268 
>   ambari-server/src/test/java/org/apache/ambari/server/security/authorization/TestUsers.java
aef0ea7 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java eb9c952

> 
> Diff: https://reviews.apache.org/r/23694/diff/
> 
> 
> Testing
> -------
> 
> Manual tests for add / delete Ambari and view privileges.
> 
> Added new unit tests.  All existing tests pass ...
> 
> Results :
> 
> Tests run: 1788, Failures: 0, Errors: 0, Skipped: 13
> 
> ...
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 24:28.178s
> [INFO] Finished at: Fri Jul 18 18:04:07 EDT 2014
> [INFO] Final Memory: 30M/123M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message