Overview
Comment:Session: make sure the section returns something even if invalid
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 83ddebb59c61e526d44364d0e61016fe11a84e9801e0470595f8a6130993893b
User & Date: bohwaz on 2022-07-05 00:19:40
Other Links: manifest | tags
Context
2022-07-05
00:20
Implement logged user logic to Brindille check-in: 5fef060471 user: bohwaz tags: trunk
00:19
Session: make sure the section returns something even if invalid check-in: 83ddebb59c user: bohwaz tags: trunk
2022-07-04
23:30
Improve user export UX, [5421f03b712f465dbadc2bd0db60a82f012df997] check-in: d1c3f87d99 user: bohwaz tags: trunk, stable, 1.1.27
Changes

Modified src/include/lib/Garradin/Membres/Session.php from [710cbbf9c2] to [47bb0d9b71].

362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
	{
		if (!$this->getUser())
		{
			return false;
		}

		$perm_name = 'perm_' . $category;
		$perm = $this->getUser()->$perm_name;

		return ($perm >= $permission);
	}

	public function requireAccess($category, $permission)
	{
		if (!$this->canAccess($category, $permission))







|







362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
	{
		if (!$this->getUser())
		{
			return false;
		}

		$perm_name = 'perm_' . $category;
		$perm = $this->getUser()->$perm_name ?? null;

		return ($perm >= $permission);
	}

	public function requireAccess($category, $permission)
	{
		if (!$this->canAccess($category, $permission))