Skip to content

Commit

Permalink
#2 add base user group on install
Browse files Browse the repository at this point in the history
  • Loading branch information
1stthomas committed Dec 30, 2020
1 parent f3ce617 commit 6f90764
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use \Concrete\Core\Foundation\Service\ProviderList;
use \Concrete\Core\Package\Package;
use \Concrete\Core\Package\PackageService;
use \Concrete\Core\User\Group\Group;
use \Concrete\Package\Ht7C5Base\ServiceProvider;

class Controller extends Package
Expand Down Expand Up @@ -55,6 +56,8 @@ public function install()
// uses "_", the cFilename on the Pages table is empty.
// Therefor we need to update this field.
$this->fixFilenames();

$this->installUserGroups();
}

public function on_start()
Expand Down Expand Up @@ -118,6 +121,16 @@ public function upgrade()
$this->installContentFile('install.xml');
}

private function installUserGroups()
{
Group::add(
tc('GroupName', 'ht7'),
tc('ht7_c5_base', 'Base Group for ht7 apps.'),
false,
$this->pkg
);
}

/**
* Register the package services, register the package specific ErrorHandler.
*/
Expand Down

0 comments on commit 6f90764

Please sign in to comment.