Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
065db8c6
Commit
065db8c6
authored
9 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-1508: check all parameters of the user session against null
parent
19ede23a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/olat/admin/landingpages/model/Rule.java
+4
-2
4 additions, 2 deletions
src/main/java/org/olat/admin/landingpages/model/Rule.java
with
4 additions
and
2 deletions
src/main/java/org/olat/admin/landingpages/model/Rule.java
+
4
−
2
View file @
065db8c6
...
@@ -77,7 +77,9 @@ public class Rule {
...
@@ -77,7 +77,9 @@ public class Rule {
}
}
public
boolean
match
(
UserSession
userSession
)
{
public
boolean
match
(
UserSession
userSession
)
{
if
(
userSession
==
null
||
userSession
.
getRoles
()
==
null
)
return
false
;
if
(
userSession
==
null
||
userSession
.
getRoles
()
==
null
||
userSession
.
getIdentity
()
==
null
)
{
return
false
;
}
boolean
match
=
true
;
boolean
match
=
true
;
...
@@ -88,7 +90,7 @@ public class Rule {
...
@@ -88,7 +90,7 @@ public class Rule {
case
AUTHOR:
match
&=
roles
.
isAuthor
();
break
;
case
AUTHOR:
match
&=
roles
.
isAuthor
();
break
;
case
USER_MGR:
match
&=
roles
.
isUserManager
();
break
;
case
USER_MGR:
match
&=
roles
.
isUserManager
();
break
;
case
GROUP_MGR:
match
&=
roles
.
isGroupManager
();
break
;
case
GROUP_MGR:
match
&=
roles
.
isGroupManager
();
break
;
case
RSRC_MGR:
match
&=
roles
.
isInstitutionalResourceManager
();
break
;
case
RSRC_MGR:
match
&=
roles
.
isInstitutionalResourceManager
();
break
;
case
POOL_MGR:
match
&=
roles
.
isPoolAdmin
();
break
;
case
POOL_MGR:
match
&=
roles
.
isPoolAdmin
();
break
;
case
ADMIN:
match
&=
roles
.
isOLATAdmin
();
break
;
case
ADMIN:
match
&=
roles
.
isOLATAdmin
();
break
;
default
:
{
default
:
{
...
...
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