KYLIN-5270: Contribute eBay's part authentication mechanism to kylin5#1986
KYLIN-5270: Contribute eBay's part authentication mechanism to kylin5#1986Syleechan wants to merge 4 commits intoapache:kylin5from
Conversation
| } | ||
|
|
||
| @Override | ||
| public boolean userExists(String userName){ |
| if(!ifRegistered){ | ||
| try{ | ||
| accessProvider.checkAccessible(userName);// default true | ||
| } catch (AccessDeniedException e){ | ||
| logger.info("user {} is not able to access Kylin due to ", userName, e); | ||
| return false; | ||
| } | ||
| ManagedUser newUser = new ManagedUser(userName); | ||
| userService.createUser(newUser); | ||
| } | ||
| return true; |
There was a problem hiding this comment.
this logic looks a little weird.
if accessProvider.checkAccessible(userName) is false, it will create a new user. And if it is true, it will create a new user too by code reading directly.
And this method does two things, check user exists and create a new user.
There was a problem hiding this comment.
this logic first check if the user in system just use KylinUserService to check, if false then use accessProvider.checkAccessible(userName) to check, if false it will return fasle then method loadUserByUserName in class SelfManagedAuthoritiesPopulator would throw exception; if accessProvider.checkAccessible(userName) is true means user can access system and create user info.
| } | ||
|
|
||
| @Override | ||
| public void deleteUser(String userName) { |
|
Can one of the admins verify this patch? |
Proposed changes
Contribute eBay's part authentication mechanism to kylin5
Branch to commit
Types of changes
What types of changes does your code introduce to Kylin?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
If this is a relatively large or complex change, kick off the discussion at user@kylin.apache.org or dev@kylin.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...