refactor(auth): change contributor's role logic to have it included in the users_podcasts table

- update myth-auth and codeigniter to latest develop changes
- improve permission check: remove all
dynamic permissions per podcast and overwrite myth-auth services and permission filter
- remove
unnecessary code because of myth-auth upgrade
- refactor some controller code for better clarity
-
add remaining seeders in docs

closes #19, #20
This commit is contained in:
Yassine Doghri 2020-07-31 16:05:10 +00:00
commit 58364bfed1
39 changed files with 1197 additions and 685 deletions

View file

@ -0,0 +1,18 @@
<?php namespace App\Authorization;
class GroupModel extends \Myth\Auth\Authorization\GroupModel
{
public function getContributorRoles()
{
return $this->select('auth_groups.*')
->like('name', 'podcast_', 'after')
->findAll();
}
public function getUserRoles()
{
return $this->select('auth_groups.*')
->notLike('name', 'podcast_', 'after')
->findAll();
}
}