Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function createStyle(): void
*/
public function edit(): void
{
$this->checkPermission("visible,read");
$this->checkPermission("read,sty_write_content");

// @todo: check these, they are checked later, but never (ILIAS 6) set
$fixed_style = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ public function executeCommand(): void
$this->setTabs($skin_id, $style_id);
$this->tabs->activateSubTab('documentation');
$this->help->setSubScreenId('documentation');
$read_only = !$this->checkPermission('sty_management', false);
$node_id = '';
if ($this->request_wrapper->query()->has('node_id')) {
$node_id = $this->request_wrapper->query()->retrieve(
Expand Down Expand Up @@ -188,7 +187,7 @@ protected function executeDefaultCommand(ilSkinFactory $skin_factory, string $sk
$this->help->setSubScreenId('overview');
$this->setTabs($skin_id, $style_id);
$this->tabs->activateSubTab('overview');
$this->checkPermission('visible,read');
$this->checkPermission('read');
$read_only = !$this->checkPermission('sty_write_system', false);
$management_enabled = true;//$this->checkPermission('sty_management', false);
$system_styles_overview = new ilSystemStyleOverviewGUI(
Expand Down Expand Up @@ -231,15 +230,19 @@ public function checkPermission(string $a_perm, bool $a_throw_exc = true): bool
return true;
}

protected function setTabs(string $skin_id, string $style_id, string $active = '') {
protected function setTabs(string $skin_id, string $style_id, string $active = '')
{
$this->ctrl->setParameterByClass(ilSystemStyleDocumentationGUI::class, 'skin_id', $skin_id);
$this->ctrl->setParameterByClass(ilSystemStyleDocumentationGUI::class, 'style_id', $style_id);

$this->tabs->addSubTab(
'overview',
$this->lng->txt('overview'),
$this->ctrl->getLinkTargetByClass(self::class), 'documentation');
$this->tabs->addSubTab('documentation',
$this->ctrl->getLinkTargetByClass(self::class),
'documentation'
);
$this->tabs->addSubTab(
'documentation',
$this->lng->txt('documentation'),
$this->ctrl->getLinkTargetByClass(ilSystemStyleDocumentationGUI::class, 'entries')
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,18 @@ public function getTabs(): void
$this->lng->txt("system_styles"),
$this->ctrl->getLinkTargetByClass("ilsystemstylemaingui")
);
}

if ($this->rbac_system->checkAccess('read,sty_write_content', $this->object->getRefId())) {
$this->tabs_gui->addTab(
"content_styles",
$this->lng->txt("content_styles"),
$this->ctrl->getLinkTargetByClass("ilcontentstylesettingsgui", "edit")
);

}

if ($this->rbac_system->checkAccess('read,sty_write_page_layout', $this->object->getRefId())) {
$this->tabs_gui->addTab(
"page_layouts",
$this->lng->txt("page_layouts"),
Expand Down