mirror of
https://github.com/humhub/humhub.git
synced 2025-04-24 17:24:39 +02:00
Hide ContentForms when no write permissions
This commit is contained in:
parent
1bfe556ec3
commit
191f861aeb
@ -59,11 +59,25 @@ class ContentFormWidget extends HWidget {
|
||||
* Overwrite me!
|
||||
*/
|
||||
public function renderForm() {
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks write permissions
|
||||
*/
|
||||
protected function hasWritePermission() {
|
||||
return $this->contentContainer->canWrite();
|
||||
}
|
||||
|
||||
|
||||
public function run() {
|
||||
|
||||
if (!$this->hasWritePermission())
|
||||
return;
|
||||
|
||||
$this->renderForm();
|
||||
|
||||
$this->render('application.modules_core.wall.widgets.views.contentForm', array(
|
||||
'form' => $this->form,
|
||||
'contentContainer' => $this->contentContainer,
|
||||
|
Loading…
x
Reference in New Issue
Block a user