Review Request 66265: SENTRY-2155: Update JDO to grant privileges to user

2018-03-23 Thread Na Li via Review Board

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

Review request for sentry, Alexander Kolbasov, Arjun Mishra, kalyan kumar 
kalvagadda, and Sergio Pena.


Repository: sentry


Description
---

Update application code and package.jdo to add mapping between user and 
privileges


Diffs
-

  
sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MSentryGMPrivilege.java
 0e8fb06 
  
sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MSentryPrivilege.java
 73fa4ff 
  
sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MSentryUser.java
 f468a46 
  
sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/package.jdo
 9ce9cae 


Diff: https://reviews.apache.org/r/66265/diff/1/


Testing
---

build succeeds. Need to do more testing. It should be committed after 
sentry-2154 is committed. Before finishing SENTRY-2156, we cannot do much 
meaningful tests


Thanks,

Na Li



Review Request 66263: SENTRY-2154: Update schema to grant privileges to user.

2018-03-23 Thread Na Li via Review Board

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

Review request for sentry, Alexander Kolbasov, Arjun Mishra, kalyan kumar 
kalvagadda, and Sergio Pena.


Repository: sentry


Description
---

update mysql related scripts to 
1) dd new DB table SENTRY_USER_DB_PRIVILEGE_MAP and 
SENTRY_USER_GM_PRIVILEGE_MAP to support grant user to privileges
2)  a flag is added in privilege table to indicate the privilege is created by 
user, or created by sentry implicitly. I will make change in application code 
so User can view the implicit privileges, but cannot change it directly

The current change only for MySql. Once we finalize the schema, I will add more 
scripts for other DBs


Diffs
-

  
sentry-provider/sentry-provider-db/src/main/resources/010-SENTRY-2154.mysql.sql 
PRE-CREATION 
  sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-2.1.0.sql 
PRE-CREATION 
  
sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-mysql-2.0.0-to-2.1.0.sql
 PRE-CREATION 
  sentry-provider/sentry-provider-db/src/main/resources/upgrade.order.mysql 
770e1b5 


Diff: https://reviews.apache.org/r/66263/diff/1/


Testing
---

Run the script and update script, and the tables are created and updated 
successfully.


Thanks,

Na Li