Skip to content

Commit

Permalink
Fix printing for non-admin
Browse files Browse the repository at this point in the history
printers and printfile method of SkyprintController were only accessible by server admins. Now fixed to be accessible for all users.

Restriction to adminsor other groups can be made in nextcloud app settings.
  • Loading branch information
CGessinger committed Oct 3, 2023
1 parent 8bd7544 commit d36e2c4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<name>SkyPrint</name>
<summary>Print documents directly from your cloud-storage</summary>
<description><![CDATA[A straightforward app enabling users to easily print documents directly from your cloud storage. With Sky Print, you can adjust a variety of print settings, such as paper size, orientation and quality.]]></description>
<version>0.1.1</version>
<version>0.1.2</version>
<licence>agpl</licence>
<author mail="[email protected]">Christian Gessinger</author>
<website>https://github.com/CGessinger/nextcloud-skyprint</website>
Expand Down
6 changes: 6 additions & 0 deletions lib/Controller/SkyprintController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,19 @@ public function __construct($appName, IRequest $request, PrintService $printServ
$this->printService = $printService;
}

/**
* @NoAdminRequired
*/
public function printfile(string $printer, string $file, int $copies, string $orientation, string $media, string $range, int $nup)
{
return new JSONResponse(
$this->printService->print($printer, $file, $copies, $orientation, $media, $range, $nup)
);
}

/**
* @NoAdminRequired
*/
public function printers()
{
return new JSONResponse(
Expand Down

0 comments on commit d36e2c4

Please sign in to comment.