Skip to content

Commit

Permalink
Dev In demo mode you can't edit home page buttons anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Jul 26, 2016
1 parent 223a434 commit 5ba750c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions application/controllers/admin/homepagesettings.php
Expand Up @@ -88,9 +88,14 @@ public function create()
*/
public function update($id)
{
if (! Permission::model()->hasGlobalPermission('settings', 'update') )
if (! Permission::model()->hasGlobalPermission('settings', 'update'))
{
Yii::app()->session['flashmessage'] =gT('Access denied!');
Yii::app()->setFlashMessage(gT('Access denied!'),'error');
$this->getController()->redirect($this->createUrl("/admin/homepagesettings"));
}
if (Yii::app()->getConfig('demoMode'))
{
Yii::app()->setFlashMessage(gT('This setting cannot be changed because demo mode is active.'),'error');
$this->getController()->redirect($this->createUrl("/admin/homepagesettings"));
}

Expand Down

0 comments on commit 5ba750c

Please sign in to comment.