Skip to content

Commit

Permalink
[#69] Add disableEditButton option to module config
Browse files Browse the repository at this point in the history
  • Loading branch information
maxfenton authored and joshuapease committed Oct 26, 2023
1 parent 657037b commit 3cc6a97
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ function (Event $e) {
View::class,
View::EVENT_END_BODY,
static function (Event $e) {
if (
self::$config['disableEditButton']
) {
return;
}

if (
Craft::$app->config->general->devMode ||
Craft::$app->user->checkPermission('accessCp')
Expand Down Expand Up @@ -219,6 +225,7 @@ private function _loadConfig()
'tailwind' => [
'configPath' => Craft::getAlias('@config/tailwind/tailwind.json'),
],
'disableEditButton' => false,
];

$userSettings = Craft::$app->config->getConfigFromFile('viget');
Expand Down

0 comments on commit 3cc6a97

Please sign in to comment.