ILIAS
Release_4_3_x_branch Revision 61807
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
ILIAS
Todo List
Deprecated List
Modules
Namespaces
Data Structures
Files
File List
cron
include
Modules
Blog
BookingManager
Category
CategoryReference
Chatroom
Course
CourseReference
DataCollection
Exercise
ExternalFeed
File
Folder
classes
class.ilFolderExporter.php
class.ilFolderImporter.php
class.ilFolderXmlParser.php
class.ilFolderXmlWriter.php
class.ilObjFolder.php
class.ilObjFolderAccess.php
class.ilObjFolderGUI.php
class.ilObjFolderListGUI.php
Forum
Glossary
Group
HTMLLearningModule
ILinc
ItemGroup
LearningModule
MediaCast
MediaPool
Poll
RemoteCategory
RemoteCourse
RemoteFile
RemoteGlossary
RemoteGroup
RemoteLearningModule
RemoteTest
RemoteWiki
RootFolder
Scorm2004
ScormAicc
Session
Survey
SurveyQuestionPool
SystemFolder
Test
TestQuestionPool
WebResource
Wiki
WorkspaceFolder
WorkspaceRootFolder
Services
setup
sso
webservice
calendar.php
confirmReg.php
error.php
feed.php
goto.php
ilias.php
index.php
login.php
logout.php
payment.php
privfeed.php
pwassist.php
register.php
rootindex.php
sessioncheck.php
shib_login.php
shib_logout.php
start.php
studip_referrer.php
webdav.php
Globals
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
class.ilObjFolderAccess.php
Go to the documentation of this file.
1
<?php
2
3
/* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5
include_once(
"./Services/Object/classes/class.ilObjectAccess.php"
);
6
15
class
ilObjFolderAccess
extends
ilObjectAccess
16
{
17
private
static
$folderSettings
;
18
19
function
_construct
() {
20
parent::__construct();
21
}
22
23
private
static
function
getFolderSettings
() {
24
if
(is_null (
ilObjFolderAccess::$folderSettings
))
25
{
26
ilObjFolderAccess::$folderSettings
=
new
ilSetting
(
'fold'
);
27
}
28
return
ilObjFolderAccess::$folderSettings
;
29
}
30
31
44
function
_getCommands
()
45
{
46
$commands = array();
47
$commands[] = array(
"permission"
=>
"read"
,
"cmd"
=>
"view"
,
"lang_var"
=>
"show"
,
"default"
=>
true
);
48
49
include_once
'./Services/WebServices/FileManager/classes/class.ilFMSettings.php'
;
50
if
(
ilFMSettings::getInstance
()->isEnabled())
51
{
52
$commands[] = array(
53
'permission'
=>
'read'
,
54
'cmd'
=>
'fileManagerLaunch'
,
55
'lang_var'
=>
'fm_start'
,
56
'enable_anonymous'
=>
false
57
);
58
}
59
60
// why here, why read permission? it just needs info_screen_enabled = true in ilObjCategoryListGUI (alex, 30.7.2008)
61
// this is not consistent, with all other objects...
62
//$commands[] = array("permission" => "read", "cmd" => "showSummary", "lang_var" => "info_short", "enable_anonymous" => "false");
63
if
(
ilObjFolderAccess::hasDownloadAction
(
$_GET
[
"ref_id"
]))
64
{
65
$commands[] = array(
"permission"
=>
"read"
,
"cmd"
=>
"downloadFolder"
,
"lang_var"
=>
"download"
,
"enable_anonymous"
=>
"false"
);
66
}
67
// BEGIN WebDAV: Mount Webfolder.
68
include_once (
'Services/WebDAV/classes/class.ilDAVActivationChecker.php'
);
69
if
(
ilDAVActivationChecker::_isActive
())
70
{
71
include_once
'./Services/WebDAV/classes/class.ilDAVUtils.php'
;
72
if
(
ilDAVUtils::getInstance
()->isLocalPasswordInstructionRequired())
73
{
74
$commands[] = array(
'permission'
=>
'read'
,
'cmd'
=>
'showPasswordInstruction'
,
'lang_var'
=>
'mount_webfolder'
,
'enable_anonymous'
=>
'false'
);
75
}
76
else
77
{
78
$commands[] = array(
"permission"
=>
"read"
,
"cmd"
=>
"mount_webfolder"
,
"lang_var"
=>
"mount_webfolder"
,
"enable_anonymous"
=>
"false"
);
79
}
80
}
81
$commands[] = array(
"permission"
=>
"write"
,
"cmd"
=>
"enableAdministrationPanel"
,
"lang_var"
=>
"edit_content"
);
82
$commands[] = array(
"permission"
=>
"write"
,
"cmd"
=>
"edit"
,
"lang_var"
=>
"settings"
);
83
84
return
$commands;
85
}
86
87
88
private
function
hasDownloadAction
(
$ref_id
)
89
{
90
global $tree,
$ilUser
;
91
$settings =
ilObjFolderAccess::getFolderSettings
();
92
// default value should reflect previous behaviour (-> 0)
93
if
($settings->get(
"enable_download_folder"
, 0) != 1)
94
return
false
;
95
96
/*
97
* deactivated check for now, because wrong ref_id here!
98
99
$children = $tree->getChildsByTypeFilter($ref_id, array("file","fold"));
100
101
// no children at all, so no download button
102
if (count ($children) == 0)
103
return false;
104
// check if at least one of the children has a read permission
105
foreach ($children as $child)
106
{
107
if ($rbacsystem->checkAccessOfUser($ilUser->getId(), "read", $child["ref_id"]))
108
return true;
109
}
110
return false;
111
*/
112
return
true
;
113
}
114
115
}
116
117
?>
Modules
Folder
classes
class.ilObjFolderAccess.php
Generated on Sat Apr 23 2016 19:01:52 for ILIAS by
1.8.1.2 (using
Doxyfile
)