1
0
Fork 0

Add explicit check for PermissionSet and ProfileField

This commit is contained in:
Philipp Holzer 2021-10-07 20:48:39 +02:00
commit f73e4adc44
Signed by: nupplaPhil
GPG key ID: 24A7501396EB5432
3 changed files with 15 additions and 24 deletions

View file

@ -177,23 +177,6 @@ class PermissionSet extends BaseDepository
return $this->selectOrCreate($this->factory->createFromString($uid));
}
/**
* Fetch one PermissionSet with check for ownership
*
* @param int $uid The user id
* @param int $id The unique id of the PermissionSet
*
* @return Entity\PermissionSet
* @throws NotFoundException in case either the id is invalid or the PermissionSet does not relay to the given user
*/
public function selectOneForUser(int $uid, int $id): Entity\PermissionSet
{
return $this->selectOne([
'id' => $id,
'uid' => $uid,
]);
}
/**
* Selects or creates a PermissionSet based on it's fields
*