Rewrite of the authentication and authorization system

This commit is contained in:
Frederic Guillot
2015-12-05 20:31:27 -05:00
parent 346b8312e5
commit e9fedf3e5c
255 changed files with 14114 additions and 9820 deletions

View File

@@ -2,6 +2,8 @@
namespace Kanboard\Api;
use Kanboard\Core\Security\Role;
/**
* ProjectPermission API controller
*
@@ -12,16 +14,16 @@ class ProjectPermission extends \Kanboard\Core\Base
{
public function getMembers($project_id)
{
return $this->projectPermission->getMembers($project_id);
return $this->projectUserRole->getAllUsers($project_id);
}
public function revokeUser($project_id, $user_id)
{
return $this->projectPermission->revokeMember($project_id, $user_id);
return $this->projectUserRole->removeUser($project_id, $user_id);
}
public function allowUser($project_id, $user_id)
{
return $this->projectPermission->addMember($project_id, $user_id);
return $this->projectUserRole->addUser($project_id, $user_id, Role::PROJECT_MEMBER);
}
}