2016-07-29 00:37:17 +03:00
|
|
|
<?php
|
2016-08-16 14:53:50 +03:00
|
|
|
/**
|
|
|
|
* @copyright Copyright (c) 2016 Julius Härtl <jus@bitgrid.net>
|
|
|
|
*
|
|
|
|
* @author Julius Härtl <jus@bitgrid.net>
|
|
|
|
*
|
|
|
|
* @license GNU AGPL version 3 or any later version
|
2016-08-24 02:22:45 +03:00
|
|
|
*
|
2016-08-16 14:53:50 +03:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as
|
|
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
|
|
* License, or (at your option) any later version.
|
2016-08-24 02:22:45 +03:00
|
|
|
*
|
2016-08-16 14:53:50 +03:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
2016-08-24 02:22:45 +03:00
|
|
|
*
|
2016-08-16 14:53:50 +03:00
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2016-08-24 02:22:45 +03:00
|
|
|
*
|
2016-08-16 14:53:50 +03:00
|
|
|
*/
|
2016-07-29 00:37:17 +03:00
|
|
|
|
2016-08-24 02:22:45 +03:00
|
|
|
namespace OCA\Deck;
|
2016-07-29 00:37:17 +03:00
|
|
|
|
|
|
|
|
2016-10-30 15:37:14 +03:00
|
|
|
class NoPermissionException extends StatusException {
|
2016-07-29 00:37:38 +03:00
|
|
|
|
2017-01-31 12:28:59 +03:00
|
|
|
public function __construct($message, $controller = null, $method = null) {
|
2016-08-31 15:05:50 +03:00
|
|
|
parent::__construct($message);
|
2017-01-31 12:28:59 +03:00
|
|
|
if ($controller && $method) {
|
2017-10-17 01:41:53 +03:00
|
|
|
$this->message = get_class($controller) . '#' . $method . ': ' . $message;
|
2016-08-31 15:05:50 +03:00
|
|
|
}
|
|
|
|
}
|
2016-10-30 15:20:21 +03:00
|
|
|
|
|
|
|
public function getStatus() {
|
|
|
|
return 403;
|
|
|
|
}
|
2016-08-24 02:22:45 +03:00
|
|
|
}
|