57 public function __construct($a_node_id, $a_access_handler, $a_is_portfolio =
false, $a_footer = null)
61 $this->tabs = $DIC->tabs();
62 $this->tpl = $DIC[
"tpl"];
63 $this->toolbar = $DIC->toolbar();
64 $this->
user = $DIC->user();
67 $lng = $DIC->language();
71 $this->node_id = $a_node_id;
72 $this->access_handler = $a_access_handler;
73 $this->is_portfolio = (bool) $a_is_portfolio;
74 $this->footer = $a_footer;
84 $this->blocking_message = $a_val;
103 $next_class = $this->ctrl->getNextClass($this);
104 $cmd = $this->ctrl->getCmd();
106 switch ($next_class) {
107 case "ilmailsearchcoursesgui":
108 $ilTabs->setBackTarget(
109 $this->lng->txt(
"back"),
110 $this->ctrl->getLinkTarget($this,
"share")
112 include_once(
'Services/Contact/classes/class.ilMailSearchCoursesGUI.php');
114 $this->ctrl->setReturn($this,
'share');
115 $this->ctrl->forwardCommand($csearch);
120 case "ilmailsearchgroupsgui":
121 $ilTabs->setBackTarget(
122 $this->lng->txt(
"back"),
123 $this->ctrl->getLinkTarget($this,
"share")
125 include_once(
'Services/Contact/classes/class.ilMailSearchGroupsGUI.php');
127 $this->ctrl->setReturn($this,
'share');
128 $this->ctrl->forwardCommand($gsearch);
133 case "ilmailsearchgui":
134 $ilTabs->setBackTarget(
135 $this->lng->txt(
"back"),
136 $this->ctrl->getLinkTarget($this,
"share")
138 include_once(
'Services/Contact/classes/class.ilMailSearchGUI.php');
140 $this->ctrl->setReturn($this,
'share');
141 $this->ctrl->forwardCommand($usearch);
146 case "ilsingleusersharegui":
147 $ilTabs->setBackTarget(
148 $this->lng->txt(
"back"),
149 $this->ctrl->getLinkTarget($this,
"share")
151 include_once(
'Services/PersonalWorkspace/classes/class.ilSingleUserShareGUI.php');
153 $this->ctrl->setReturn($this,
'share');
154 $this->ctrl->forwardCommand($ushare);
159 case "ilpublicuserprofilegui":
160 $ilTabs->clearTargets();
161 $ilTabs->setBackTarget(
162 $this->lng->txt(
"back"),
163 $this->ctrl->getLinkTarget($this,
"share")
166 include_once(
'./Services/User/classes/class.ilPublicUserProfileGUI.php');
168 $prof->setBackUrl($this->ctrl->getLinkTarget($this,
"share"));
169 $tpl->setContent($prof->getHTML());
177 return $this->$cmd();
192 if (!$this->is_portfolio) {
193 $obj_id = $this->access_handler->getTree()->lookupObjectId($this->node_id);
220 $options[
"user"] = $this->lng->txt(
"wsp_set_permission_single_user");
222 include_once
'Modules/Group/classes/class.ilGroupParticipants.php';
224 if (
sizeof($grp_ids)) {
225 $options[
"group"] = $this->lng->txt(
"wsp_set_permission_group");
228 include_once
'Modules/Course/classes/class.ilCourseParticipants.php';
230 if (
sizeof($crs_ids)) {
231 $options[
"course"] = $this->lng->txt(
"wsp_set_permission_course");
235 $options[
"registered"] = $this->lng->txt(
"wsp_set_permission_registered");
238 if (
$ilSetting->get(
"enable_global_profiles")) {
239 if (!$this->
getAccessHandler()->hasGlobalPasswordPermission($this->node_id)) {
240 $options[
"password"] = $this->lng->txt(
"wsp_set_permission_all_password");
244 $options[
"all"] = $this->lng->txt(
"wsp_set_permission_all");
248 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
251 $ilToolbar->addStickyItem($actions);
253 $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
255 include_once
"Services/UIComponent/Button/classes/class.ilSubmitButton.php";
257 $button->setCaption(
"add");
258 $button->setCommand(
"addpermissionhandler");
259 $ilToolbar->addStickyItem($button);
261 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessTableGUI.php";
268 switch ($_REQUEST[
"action"]) {
271 include_once
'./Services/User/classes/class.ilUserAccountSettings.php';
273 $this->ctrl->redirectByClass(
"ilsingleusersharegui");
275 $this->ctrl->setParameterByClass(
"ilmailsearchgui",
"ref",
"wsp");
276 $this->ctrl->redirectByClass(
"ilmailsearchgui");
281 $this->ctrl->setParameterByClass(
"ilmailsearchgroupsgui",
"ref",
"wsp");
282 $this->ctrl->redirectByClass(
"ilmailsearchgroupsgui");
286 $this->ctrl->setParameterByClass(
"ilmailsearchcoursesgui",
"ref",
"wsp");
287 $this->ctrl->redirectByClass(
"ilmailsearchcoursesgui");
291 $this->
getAccessHandler()->addPermission($this->node_id, self::PERMISSION_REGISTERED);
292 ilUtil::sendSuccess($this->lng->txt(
"wsp_permission_registered_info"),
true);
293 $this->ctrl->redirect($this,
"share");
301 $this->
getAccessHandler()->addPermission($this->node_id, self::PERMISSION_ALL);
302 ilUtil::sendSuccess($this->lng->txt(
"wsp_permission_all_info"),
true);
303 $this->ctrl->redirect($this,
"share");
309 if ($_REQUEST[
"obj_id"]) {
310 $this->
getAccessHandler()->removePermission($this->node_id, (
int) $_REQUEST[
"obj_id"]);
311 ilUtil::sendSuccess($this->lng->txt(
"wsp_permission_removed"),
true);
314 $this->ctrl->redirect($this,
"share");
319 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
321 $form->setFormAction($this->ctrl->getFormAction($this));
322 $form->setTitle($this->lng->txt(
"wsp_set_permission_all_password"));
328 $form->addCommandButton(
'savepasswordform', $this->lng->txt(
"save"));
329 $form->addCommandButton(
'share', $this->lng->txt(
"cancel"));
341 $tpl->setContent($a_form->getHTML());
347 if (
$form->checkInput()) {
350 self::PERMISSION_ALL_PASSWORD,
351 md5(
$form->getInput(
"password"))
353 ilUtil::sendSuccess($this->lng->txt(
"wsp_permission_all_pw_info"),
true);
354 $this->ctrl->redirect($this,
"share");
357 $form->setValuesByPost();
__construct($a_node_id, $a_access_handler, $a_is_portfolio=false, $a_footer=null)
const PERMISSION_ALL_PASSWORD
setObjectTitle()
restore object title
static _getMembershipByType($a_usr_id, $a_type, $a_only_member_role=false)
get membership by type Get course or group membership
static _lookupTitle($a_id)
lookup object title
const PERMISSION_REGISTERED
GUI class for public user profile presentation.
if(isset($_POST['submit'])) $form
getBlockingMessage()
Get blocking message.
static getInstance()
Singelton get instance.
showPasswordForm(ilPropertyFormGUI $a_form=null)
Workspace access handler table GUI class.
if(empty($password)) $table
setBlockingMessage($a_val)
Set blocking message.