Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
reg-app
Regapp
Commits
5f79129b
Commit
5f79129b
authored
Feb 18, 2016
by
michael.simon
Browse files
Bugfix set service password
parent
97a36435
Changes
1
Hide whitespace changes
Inline
Side-by-side
bwreg-webapp/src/main/java/edu/kit/scc/webreg/bean/SetServicePasswordBean.java
View file @
5f79129b
...
...
@@ -21,6 +21,7 @@ import edu.kit.scc.webreg.entity.RegistryEntity;
import
edu.kit.scc.webreg.entity.RegistryStatus
;
import
edu.kit.scc.webreg.entity.ServiceEntity
;
import
edu.kit.scc.webreg.entity.UserEntity
;
import
edu.kit.scc.webreg.exc.NotAuthorizedException
;
import
edu.kit.scc.webreg.exc.RegisterException
;
import
edu.kit.scc.webreg.sec.AuthorizationBean
;
import
edu.kit.scc.webreg.service.RegistryService
;
...
...
@@ -73,7 +74,10 @@ public class SetServicePasswordBean implements Serializable {
userEntity
=
userService
.
findById
(
sessionManager
.
getUserId
());
serviceEntity
=
registryEntity
.
getService
();
if
(!
registryEntity
.
getUser
().
getId
().
equals
(
userEntity
.
getId
()))
throw
new
NotAuthorizedException
(
"Not authorized to view this item"
);
if
(!
authBean
.
isUserInService
(
serviceEntity
))
throw
new
IllegalArgumentException
(
"Not authorized for this service"
);
...
...
Write
Preview
Supports
Markdown
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!
Cancel
Please
register
or
sign in
to comment