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
562e0949
Commit
562e0949
authored
11 years ago
by
srosse
Browse files
Options
Downloads
Plain Diff
Merge OpenOLAT 9.3 to OpenOLAT default branch with f519cac276e94f6db068e8b3a2f971ebb427d7ca
parents
f639ba57
5151b226
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
src/main/java/org/olat/core/commons/modules/bc/FolderRunController.java
+13
-8
13 additions, 8 deletions
...org/olat/core/commons/modules/bc/FolderRunController.java
with
13 additions
and
8 deletions
src/main/java/org/olat/core/commons/modules/bc/FolderRunController.java
+
13
−
8
View file @
562e0949
...
@@ -438,17 +438,22 @@ public class FolderRunController extends BasicController implements Activateable
...
@@ -438,17 +438,22 @@ public class FolderRunController extends BasicController implements Activateable
private
void
enableDisableQuota
(
UserRequest
ureq
)
{
private
void
enableDisableQuota
(
UserRequest
ureq
)
{
//prevent a timing condition if the user logout while a thumbnail is generated
//prevent a timing condition if the user logout while a thumbnail is generated
if
(
ureq
.
getUserSession
()
==
null
||
ureq
.
getUserSession
().
getRoles
()
==
null
)
{
if
(
ureq
.
getUserSession
()
==
null
||
ureq
.
getUserSession
().
getRoles
()
==
null
)
{
folderContainer
.
contextPut
(
"editQuota"
,
Boolean
.
FALSE
);
return
;
return
;
}
else
if
(!
ureq
.
getUserSession
().
getRoles
().
isOLATAdmin
())
{
}
if
(!
ureq
.
getUserSession
().
getRoles
().
isInstitutionalResourceManager
())
{
folderContainer
.
contextPut
(
"editQuota"
,
Boolean
.
FALSE
);
Boolean
newEditQuota
=
Boolean
.
FALSE
;
return
;
if
(
ureq
.
getUserSession
().
getRoles
().
isOLATAdmin
()
||
ureq
.
getUserSession
().
getRoles
().
isInstitutionalResourceManager
())
{
}
// Only sys admins or institutonal resource managers can have the quota button
Quota
q
=
VFSManager
.
isTopLevelQuotaContainer
(
folderComponent
.
getCurrentContainer
());
newEditQuota
=
(
q
==
null
)?
Boolean
.
FALSE
:
Boolean
.
TRUE
;
}
}
Quota
q
=
VFSManager
.
isTopLevelQuotaContainer
(
folderComponent
.
getCurrentContainer
());
Boolean
currentEditQuota
=
(
Boolean
)
folderContainer
.
contextGet
(
"editQuota"
);
folderContainer
.
contextPut
(
"editQuota"
,
(
q
==
null
)?
Boolean
.
FALSE
:
Boolean
.
TRUE
);
// Update the container only if a new value is available or no value is set to
// not make the component dirty after asynchronous thumbnail loading
if
(
currentEditQuota
==
null
||
!
currentEditQuota
.
equals
(
newEditQuota
))
{
folderContainer
.
contextPut
(
"editQuota"
,
newEditQuota
);
}
}
}
/**
/**
...
...
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