mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-12 12:25:16 +08:00
modify general user can't create token (#3533)
* [Feature] JVM parameter optimization , related issue #3370 * [Feature] JVM parameter optimization , related issue #3370 * test release 1.3.2 version rollback * test release 1.3.2 version rollback * test * test release 1.3.2 version rollback * modify tag 1.3.0 to HEAD * modify general user can't create token Co-authored-by: qiaozhanwei <qiaozhanwei@analysys.com.cn>
This commit is contained in:
parent
cc20827996
commit
8093cd4553
@ -120,9 +120,11 @@ public class AccessTokenService extends BaseService {
|
||||
*/
|
||||
public Map<String, Object> generateToken(User loginUser, int userId, String expireTime) {
|
||||
Map<String, Object> result = new HashMap<>(5);
|
||||
if(check(result, !isAdmin(loginUser), Status.USER_NO_OPERATION_PERM)){
|
||||
if (!hasPerm(loginUser,userId)){
|
||||
putMsg(result, Status.USER_NO_OPERATION_PERM);
|
||||
return result;
|
||||
}
|
||||
|
||||
String token = EncryptionUtils.getMd5(userId + expireTime + String.valueOf(System.currentTimeMillis()));
|
||||
result.put(Constants.DATA_LIST, token);
|
||||
putMsg(result, Status.SUCCESS);
|
||||
|
Loading…
Reference in New Issue
Block a user