2020-08-04 11:25:22 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Authorization;
|
2020-07-31 16:05:10 +00:00
|
|
|
|
|
|
|
class GroupModel extends \Myth\Auth\Authorization\GroupModel
|
|
|
|
{
|
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();
|
|
|
|
}
|
|
|
|
}
|