mirror of
https://github.com/standardebooks/web.git
synced 2025-07-15 02:46:46 -04:00
Add beginning of a project management system to placeholders
This commit is contained in:
parent
e56de4b19d
commit
adfe07aad9
42 changed files with 717 additions and 118 deletions
28
lib/User.php
28
lib/User.php
|
@ -345,6 +345,34 @@ class User{
|
|||
', [$uuid], User::class)[0] ?? throw new Exceptions\UserNotFoundException();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<User>
|
||||
*/
|
||||
public static function GetAllByCanManageProjects(): array{
|
||||
return Db::Query('
|
||||
SELECT u.*
|
||||
from Users u
|
||||
inner join Benefits b
|
||||
using (UserId)
|
||||
where b.CanManageProjects = true
|
||||
order by Name asc
|
||||
', [], User::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<User>
|
||||
*/
|
||||
public static function GetAllByCanReviewProjects(): array{
|
||||
return Db::Query('
|
||||
SELECT u.*
|
||||
from Users u
|
||||
inner join Benefits b
|
||||
using (UserId)
|
||||
where b.CanReviewProjects = true
|
||||
order by Name asc
|
||||
', [], User::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a `User` if they are considered "registered".
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue