Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify general user can't create token #3533

Merged
merged 20 commits into from
Aug 18, 2020
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
6e656ca
[Feature] JVM parameter optimization , related issue #3370
Aug 1, 2020
07a1c0a
[Feature] JVM parameter optimization , related issue #3370
Aug 1, 2020
8d54df7
Merge remote-tracking branch 'remotes/upstream/1.3.2-release' into 1.…
Aug 1, 2020
27b4083
Merge remote-tracking branch 'remotes/upstream/1.3.2-release' into 1.…
Aug 3, 2020
2c4df32
Merge remote-tracking branch 'remotes/upstream/1.3.2-release' into 1.…
Aug 4, 2020
ef8dd3c
Merge remote-tracking branch 'remotes/upstream/1.3.2-release' into 1.…
Aug 5, 2020
6d33aa7
Merge remote-tracking branch 'remotes/upstream/1.3.2-release' into 1.…
Aug 14, 2020
a7ac1bb
Merge remote-tracking branch 'remotes/upstream/1.3.2-release' into 1.…
Aug 14, 2020
b4b8c80
test release 1.3.2 version rollback
Aug 14, 2020
3191bfd
test release 1.3.2 version rollback
Aug 14, 2020
abd20af
Merge remote-tracking branch 'remotes/upstream/1.3.2-release' into 1.…
Aug 14, 2020
177b7b9
Merge remote-tracking branch 'remotes/upstream/1.3.2-release' into 1.…
Aug 14, 2020
e26b654
test
Aug 14, 2020
ed6f579
test release 1.3.2 version rollback
Aug 14, 2020
d86cc4b
Merge remote-tracking branch 'remotes/upstream/1.3.2-release' into 1.…
Aug 14, 2020
944758b
Merge remote-tracking branch 'remotes/upstream/1.3.2-release' into 1.…
Aug 17, 2020
2ed5f06
modify tag 1.3.0 to HEAD
Aug 17, 2020
0559efa
Merge remote-tracking branch 'remotes/upstream/1.3.2-release' into 1.…
Aug 17, 2020
54f0c2c
Merge remote-tracking branch 'remotes/upstream/1.3.2-release' into 1.…
Aug 17, 2020
94e453c
modify general user can't create token
Aug 18, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,11 @@ public Map<String, Object> createToken(User loginUser, int userId, String expire
*/
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);
Expand Down