|
|
@ -138,14 +138,14 @@ public class UsersService extends BaseService { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Transactional(rollbackFor = RuntimeException.class) |
|
|
|
public User createUser(String userName, |
|
|
|
public User createUser(String userName, |
|
|
|
String userPassword, |
|
|
|
String userPassword, |
|
|
|
String email, |
|
|
|
String email, |
|
|
|
int tenantId, |
|
|
|
int tenantId, |
|
|
|
String phone, |
|
|
|
String phone, |
|
|
|
String queue, |
|
|
|
String queue, |
|
|
|
int state) throws Exception { |
|
|
|
int state) { |
|
|
|
User user = new User(); |
|
|
|
User user = new User(); |
|
|
|
Date now = new Date(); |
|
|
|
Date now = new Date(); |
|
|
|
|
|
|
|
|
|
|
@ -430,7 +430,7 @@ public class UsersService extends BaseService { |
|
|
|
* @param projectIds project id array |
|
|
|
* @param projectIds project id array |
|
|
|
* @return grant result code |
|
|
|
* @return grant result code |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Transactional(rollbackFor = RuntimeException.class) |
|
|
|
public Map<String, Object> grantProject(User loginUser, int userId, String projectIds) { |
|
|
|
public Map<String, Object> grantProject(User loginUser, int userId, String projectIds) { |
|
|
|
Map<String, Object> result = new HashMap<>(5); |
|
|
|
Map<String, Object> result = new HashMap<>(5); |
|
|
|
result.put(Constants.STATUS, false); |
|
|
|
result.put(Constants.STATUS, false); |
|
|
@ -480,7 +480,7 @@ public class UsersService extends BaseService { |
|
|
|
* @param resourceIds resource id array |
|
|
|
* @param resourceIds resource id array |
|
|
|
* @return grant result code |
|
|
|
* @return grant result code |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Transactional(rollbackFor = RuntimeException.class) |
|
|
|
public Map<String, Object> grantResources(User loginUser, int userId, String resourceIds) { |
|
|
|
public Map<String, Object> grantResources(User loginUser, int userId, String resourceIds) { |
|
|
|
Map<String, Object> result = new HashMap<>(5); |
|
|
|
Map<String, Object> result = new HashMap<>(5); |
|
|
|
//only admin can operate
|
|
|
|
//only admin can operate
|
|
|
@ -577,7 +577,7 @@ public class UsersService extends BaseService { |
|
|
|
* @param udfIds udf id array |
|
|
|
* @param udfIds udf id array |
|
|
|
* @return grant result code |
|
|
|
* @return grant result code |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Transactional(rollbackFor = RuntimeException.class) |
|
|
|
public Map<String, Object> grantUDFFunction(User loginUser, int userId, String udfIds) { |
|
|
|
public Map<String, Object> grantUDFFunction(User loginUser, int userId, String udfIds) { |
|
|
|
Map<String, Object> result = new HashMap<>(5); |
|
|
|
Map<String, Object> result = new HashMap<>(5); |
|
|
|
|
|
|
|
|
|
|
@ -624,7 +624,7 @@ public class UsersService extends BaseService { |
|
|
|
* @param datasourceIds data source id array |
|
|
|
* @param datasourceIds data source id array |
|
|
|
* @return grant result code |
|
|
|
* @return grant result code |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Transactional(rollbackFor = RuntimeException.class) |
|
|
|
public Map<String, Object> grantDataSource(User loginUser, int userId, String datasourceIds) { |
|
|
|
public Map<String, Object> grantDataSource(User loginUser, int userId, String datasourceIds) { |
|
|
|
Map<String, Object> result = new HashMap<>(5); |
|
|
|
Map<String, Object> result = new HashMap<>(5); |
|
|
|
result.put(Constants.STATUS, false); |
|
|
|
result.put(Constants.STATUS, false); |
|
|
@ -917,10 +917,9 @@ public class UsersService extends BaseService { |
|
|
|
* @param repeatPassword repeat password |
|
|
|
* @param repeatPassword repeat password |
|
|
|
* @param email email |
|
|
|
* @param email email |
|
|
|
* @return register result code |
|
|
|
* @return register result code |
|
|
|
* @throws Exception exception |
|
|
|
|
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Transactional(rollbackFor = RuntimeException.class) |
|
|
|
public Map<String, Object> registerUser(String userName, String userPassword, String repeatPassword, String email) throws Exception { |
|
|
|
public Map<String, Object> registerUser(String userName, String userPassword, String repeatPassword, String email) { |
|
|
|
Map<String, Object> result = new HashMap<>(5); |
|
|
|
Map<String, Object> result = new HashMap<>(5); |
|
|
|
|
|
|
|
|
|
|
|
//check user params
|
|
|
|
//check user params
|
|
|
|