2020-08-04 11:25:22 +00:00
|
|
|
<?php
|
|
|
|
|
2021-06-08 09:52:11 +00:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2021-08-23 11:05:16 +00:00
|
|
|
namespace Modules\Auth\Authorization;
|
2020-07-31 16:05:10 +00:00
|
|
|
|
2021-05-12 14:00:25 +00:00
|
|
|
use Myth\Auth\Authorization\GroupModel as MythAuthGroupModel;
|
|
|
|
|
|
|
|
class GroupModel extends MythAuthGroupModel
|
2020-07-31 16:05:10 +00:00
|
|
|
{
|
2021-05-06 14:00:48 +00:00
|
|
|
/**
|
|
|
|
* @return mixed[]
|
|
|
|
*/
|
|
|
|
public function getContributorRoles(): array
|
2020-07-31 16:05:10 +00:00
|
|
|
{
|
|
|
|
return $this->select('auth_groups.*')
|
|
|
|
->like('name', 'podcast_', 'after')
|
|
|
|
->findAll();
|
|
|
|
}
|
|
|
|
|
2021-05-06 14:00:48 +00:00
|
|
|
/**
|
|
|
|
* @return mixed[]
|
|
|
|
*/
|
|
|
|
public function getUserRoles(): array
|
2020-07-31 16:05:10 +00:00
|
|
|
{
|
|
|
|
return $this->select('auth_groups.*')
|
|
|
|
->notLike('name', 'podcast_', 'after')
|
|
|
|
->findAll();
|
|
|
|
}
|
|
|
|
}
|