Groundwork for #11

This commit is contained in:
snipe
2013-12-04 12:13:23 -05:00
parent 329980c6c6
commit c5678414ae
+43
View File
@@ -245,6 +245,49 @@ class AppCommand extends Command {
{
$this->error('Group already exists.');
}
try
{
// Create the reporting group
$group = Sentry::getGroupProvider()->create(array(
'name' => 'Reporting',
'permissions' => array(
'admin' => 0,
'users' => 1
)
));
// Show the success message.
$this->comment('');
$this->info('Reporting group created successfully.');
}
catch (Cartalyst\Sentry\Groups\GroupExistsException $e)
{
$this->error('Group already exists.');
}
try
{
// Create the general users group
$group = Sentry::getGroupProvider()->create(array(
'name' => 'Users',
'permissions' => array(
'admin' => 0,
'users' => 1
)
));
// Show the success message.
$this->comment('');
$this->info('Users group created successfully.');
}
catch (Cartalyst\Sentry\Groups\GroupExistsException $e)
{
$this->error('Group already exists.');
}
}
/**