Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nachrichten-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OZG-Cloud
app
nachrichten-manager
Commits
67c11c68
Commit
67c11c68
authored
6 months ago
by
OZGCloud
Browse files
Options
Downloads
Patches
Plain Diff
OZG-6944 extract string to constant
parent
b53ab699
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nachrichten-manager-server/src/main/java/de/ozgcloud/nachrichten/antragraum/AntragraumService.java
+5
-3
5 additions, 3 deletions
...de/ozgcloud/nachrichten/antragraum/AntragraumService.java
with
5 additions
and
3 deletions
nachrichten-manager-server/src/main/java/de/ozgcloud/nachrichten/antragraum/AntragraumService.java
+
5
−
3
View file @
67c11c68
...
...
@@ -65,6 +65,8 @@ import lombok.extern.log4j.Log4j2;
@ConditionalOnProperty
(
AntragraumProperties
.
PROPERTY_ANTRAGSRAUM_URL
)
public
class
AntragraumService
{
private
static
final
String
POSTFACH_NACHRICHT
=
"PostfachNachricht"
;
static
final
String
BAYERN_ID_SERVICE_KONTO_TYPE
=
"BAYERN_ID"
;
static
final
String
USER_NOTIFICATION_TEMPLATE
=
"""
...
...
@@ -233,21 +235,21 @@ public class AntragraumService {
void
verifyPostfachId
(
String
samlToken
,
PostfachNachricht
nachricht
,
Vorgang
vorgang
)
{
if
(!
StringUtils
.
equals
(
vorgang
.
getPostfachId
(),
getPostfachId
(
samlToken
)))
{
LOG
.
info
(
"PostfachId in token is not matching postfachId in vorgang."
);
throw
new
NotFoundException
(
GenericId
.
from
(
nachricht
.
getId
()),
"PostfachNachricht"
);
throw
new
NotFoundException
(
GenericId
.
from
(
nachricht
.
getId
()),
POSTFACH_NACHRICHT
);
}
}
void
verifyTrustLevel
(
String
token
,
PostfachNachricht
nachricht
,
Vorgang
vorgang
)
{
if
(!
isAccessible
(
token
,
vorgang
.
getTrustLevel
()))
{
LOG
.
info
(
"Trustlevel in token is not great enough to access vorgang."
);
throw
new
NotFoundException
(
GenericId
.
from
(
nachricht
.
getId
()),
"PostfachNachricht"
);
throw
new
NotFoundException
(
GenericId
.
from
(
nachricht
.
getId
()),
POSTFACH_NACHRICHT
);
}
}
void
verifyFileId
(
String
fileId
,
PostfachNachricht
nachricht
)
{
if
(!
nachricht
.
getAttachments
().
contains
(
fileId
))
{
LOG
.
info
(
"FileId is not present in attachment list of PostfachNachricht"
);
throw
new
NotFoundException
(
GenericId
.
from
(
nachricht
.
getId
()),
"PostfachNachricht"
);
throw
new
NotFoundException
(
GenericId
.
from
(
nachricht
.
getId
()),
POSTFACH_NACHRICHT
);
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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