forked from mirror/Part-DB.Part-DB-server
Check permissions for time travel and element undo.
This commit is contained in:
parent
254d4e6c69
commit
8a61b465d0
23 changed files with 370 additions and 90 deletions
|
@ -86,13 +86,21 @@ class HomepageController extends AbstractController
|
|||
*/
|
||||
public function homepage(Request $request, GitVersionInfo $versionInfo): Response
|
||||
{
|
||||
$table = $this->dataTable->createFromType(LogDataTable::class, [
|
||||
'mode' => 'last_activity'
|
||||
], ['pageLength' => 10])
|
||||
->handleRequest($request);
|
||||
if ($this->isGranted("@tools.lastActivity")) {
|
||||
$table = $this->dataTable->createFromType(
|
||||
LogDataTable::class,
|
||||
[
|
||||
'mode' => 'last_activity'
|
||||
],
|
||||
['pageLength' => 10]
|
||||
)
|
||||
->handleRequest($request);
|
||||
|
||||
if ($table->isCallback()) {
|
||||
return $table->getResponse();
|
||||
if ($table->isCallback()) {
|
||||
return $table->getResponse();
|
||||
}
|
||||
} else {
|
||||
$table = null;
|
||||
}
|
||||
|
||||
return $this->render('homepage.html.twig', [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue