Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Plan
Issues
27
Issue boards
Milestones
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
ARSnova
ARSnova Backend
Commits
b49ca9e1
Commit
b49ca9e1
authored
10 years ago
by
Paul-Christian Volkmer
Browse files
Options
Downloads
Patches
Plain Diff
Only send Sha512 hash to creator
parent
01947c3e
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/thm/arsnova/controller/SessionController.java
+6
-3
6 additions, 3 deletions
...ain/java/de/thm/arsnova/controller/SessionController.java
with
6 additions
and
3 deletions
src/main/java/de/thm/arsnova/controller/SessionController.java
+
6
−
3
View file @
b49ca9e1
...
...
@@ -32,6 +32,7 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.security.access.AccessDeniedException
;
import
org.springframework.security.core.token.Sha512DigestUtils
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -65,8 +66,10 @@ public class SessionController extends AbstractController {
@RequestMapping
(
value
=
"/{sessionkey}"
,
method
=
RequestMethod
.
GET
)
public
final
Session
joinSession
(
@PathVariable
final
String
sessionkey
)
{
final
Session
session
=
sessionService
.
joinSession
(
sessionkey
);
if
(
session
.
getCreator
().
equals
(
userService
.
getCurrentUser
().
getUsername
()))
{
if
(
!
session
.
getCreator
().
equals
(
userService
.
getCurrentUser
().
getUsername
()))
{
session
.
setCreator
(
"NOT VISIBLE TO YOU"
);
}
else
{
session
.
setCreator
(
Sha512DigestUtils
.
shaHex
(
session
.
getCreator
()));
}
return
session
;
}
...
...
@@ -185,8 +188,8 @@ public class SessionController extends AbstractController {
@PathVariable
final
String
sessionkey
,
final
HttpServletResponse
response
)
{
SimpleEntry
<
Integer
,
Integer
>
result
=
sessionService
.
getMyLearningProgress
(
sessionkey
);
JSONObject
json
=
new
JSONObject
();
final
SimpleEntry
<
Integer
,
Integer
>
result
=
sessionService
.
getMyLearningProgress
(
sessionkey
);
final
JSONObject
json
=
new
JSONObject
();
json
.
put
(
"myprogress"
,
result
.
getKey
());
json
.
put
(
"courseprogress"
,
result
.
getValue
());
return
json
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment